]> git.karo-electronics.de Git - linux-beck.git/commitdiff
gpio: use (!foo) instead of (foo == NULL)
authorVarka Bhadram <varkabhadram@gmail.com>
Tue, 31 Mar 2015 04:19:11 +0000 (09:49 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 8 Apr 2015 07:54:21 +0000 (09:54 +0200)
Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-adp5588.c
drivers/gpio/gpio-arizona.c
drivers/gpio/gpio-da9052.c
drivers/gpio/gpio-da9055.c
drivers/gpio/gpio-kempld.c
drivers/gpio/gpio-mc33880.c

index 0de8c7008122bfe3d044716a380831ae193e399d..c90273dac289ebc4a904c25b15f35fd34a48d809 100644 (file)
@@ -367,7 +367,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
        struct gpio_chip *gc;
        int ret, i, revid;
 
-       if (pdata == NULL) {
+       if (!pdata) {
                dev_err(&client->dev, "missing platform data\n");
                return -ENODEV;
        }
@@ -379,7 +379,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
        }
 
        dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL);
-       if (dev == NULL)
+       if (!dev)
                return -ENOMEM;
 
        dev->client = client;
index ab350383660c3e4270b0112ca69f445eebbfe8d7..eb5a0ce49fa59ecc0c8486a40d7a2d78d7b998aa 100644 (file)
@@ -103,7 +103,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)
 
        arizona_gpio = devm_kzalloc(&pdev->dev, sizeof(*arizona_gpio),
                                    GFP_KERNEL);
-       if (arizona_gpio == NULL)
+       if (!arizona_gpio)
                return -ENOMEM;
 
        arizona_gpio->arizona = arizona;
index 389a4d2a4926d26fa3f53e1acd9bcc4218e498f2..2e9578ec0ca1316381e86f12ea3adae7cc12cbf9 100644 (file)
@@ -212,7 +212,7 @@ static int da9052_gpio_probe(struct platform_device *pdev)
        int ret;
 
        gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
-       if (gpio == NULL)
+       if (!gpio)
                return -ENOMEM;
 
        gpio->da9052 = dev_get_drvdata(pdev->dev.parent);
index b8d7570368871f0b6a94129253e567b98893208f..7227e6ed3cb9291a1142a044622b36cf1ccf123b 100644 (file)
@@ -146,7 +146,7 @@ static int da9055_gpio_probe(struct platform_device *pdev)
        int ret;
 
        gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
-       if (gpio == NULL)
+       if (!gpio)
                return -ENOMEM;
 
        gpio->da9055 = dev_get_drvdata(pdev->dev.parent);
index 443518f63f157ab47d69346c972b744ef718acfa..6b8115f342085bb3b25f78ad8c13ed6ce10a9d7b 100644 (file)
@@ -156,7 +156,7 @@ static int kempld_gpio_probe(struct platform_device *pdev)
        }
 
        gpio = devm_kzalloc(dev, sizeof(*gpio), GFP_KERNEL);
-       if (gpio == NULL)
+       if (!gpio)
                return -ENOMEM;
 
        gpio->pld = pld;
index 4e3e160e5db2cbd72ca9755ab9eedff2fc04c99c..a431604c9e677beb30c69be99c221e44ea70f2e5 100644 (file)
@@ -151,7 +151,7 @@ static int mc33880_remove(struct spi_device *spi)
        struct mc33880 *mc;
 
        mc = spi_get_drvdata(spi);
-       if (mc == NULL)
+       if (!mc)
                return -ENODEV;
 
        gpiochip_remove(&mc->chip);