lkml.org 
[lkml]   [2011]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 2/2] gpio-pch: using zero instead of NULL
    Sparse gets cross if you use zero instead of NULL.
    drivers/gpio/gpio-pch.c:379:27: warning: Using plain integer as NULL pointer

    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

    diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
    index 4068084..7ddac42 100644
    --- a/drivers/gpio/gpio-pch.c
    +++ b/drivers/gpio/gpio-pch.c
    @@ -376,7 +376,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
    }

    chip->base = pci_iomap(pdev, 1, 0);
    - if (chip->base == 0) {
    + if (chip->base == NULL) {
    dev_err(&pdev->dev, "%s : pci_iomap FAILED", __func__);
    ret = -ENOMEM;
    goto err_iomap;

    \
     
     \ /
      Last update: 2011-10-18 08:29    [W:0.020 / U:63.652 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site