aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorVarka Bhadram <varkabhadram@gmail.com>2015-03-31 00:19:11 -0400
committerLinus Walleij <linus.walleij@linaro.org>2015-04-08 03:54:21 -0400
commitafeb7b45e96239f0bfa610dd40945786f5a9b164 (patch)
tree96ae1b9942dbc28854d22234af269d19169cd25a /drivers/gpio
parent4878b46679f5b0ec86cc6ff48f4edb8a54e2a4d0 (diff)
gpio: use (!foo) instead of (foo == NULL)
Signed-off-by: Varka Bhadram <varkab@cdac.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-adp5588.c4
-rw-r--r--drivers/gpio/gpio-arizona.c2
-rw-r--r--drivers/gpio/gpio-da9052.c2
-rw-r--r--drivers/gpio/gpio-da9055.c2
-rw-r--r--drivers/gpio/gpio-kempld.c2
-rw-r--r--drivers/gpio/gpio-mc33880.c2
6 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index 0de8c7008122..c90273dac289 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -367,7 +367,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
367 struct gpio_chip *gc; 367 struct gpio_chip *gc;
368 int ret, i, revid; 368 int ret, i, revid;
369 369
370 if (pdata == NULL) { 370 if (!pdata) {
371 dev_err(&client->dev, "missing platform data\n"); 371 dev_err(&client->dev, "missing platform data\n");
372 return -ENODEV; 372 return -ENODEV;
373 } 373 }
@@ -379,7 +379,7 @@ static int adp5588_gpio_probe(struct i2c_client *client,
379 } 379 }
380 380
381 dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL); 381 dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL);
382 if (dev == NULL) 382 if (!dev)
383 return -ENOMEM; 383 return -ENOMEM;
384 384
385 dev->client = client; 385 dev->client = client;
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c
index ab350383660c..eb5a0ce49fa5 100644
--- a/drivers/gpio/gpio-arizona.c
+++ b/drivers/gpio/gpio-arizona.c
@@ -103,7 +103,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)
103 103
104 arizona_gpio = devm_kzalloc(&pdev->dev, sizeof(*arizona_gpio), 104 arizona_gpio = devm_kzalloc(&pdev->dev, sizeof(*arizona_gpio),
105 GFP_KERNEL); 105 GFP_KERNEL);
106 if (arizona_gpio == NULL) 106 if (!arizona_gpio)
107 return -ENOMEM; 107 return -ENOMEM;
108 108
109 arizona_gpio->arizona = arizona; 109 arizona_gpio->arizona = arizona;
diff --git a/drivers/gpio/gpio-da9052.c b/drivers/gpio/gpio-da9052.c
index 389a4d2a4926..2e9578ec0ca1 100644
--- a/drivers/gpio/gpio-da9052.c
+++ b/drivers/gpio/gpio-da9052.c
@@ -212,7 +212,7 @@ static int da9052_gpio_probe(struct platform_device *pdev)
212 int ret; 212 int ret;
213 213
214 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); 214 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
215 if (gpio == NULL) 215 if (!gpio)
216 return -ENOMEM; 216 return -ENOMEM;
217 217
218 gpio->da9052 = dev_get_drvdata(pdev->dev.parent); 218 gpio->da9052 = dev_get_drvdata(pdev->dev.parent);
diff --git a/drivers/gpio/gpio-da9055.c b/drivers/gpio/gpio-da9055.c
index b8d757036887..7227e6ed3cb9 100644
--- a/drivers/gpio/gpio-da9055.c
+++ b/drivers/gpio/gpio-da9055.c
@@ -146,7 +146,7 @@ static int da9055_gpio_probe(struct platform_device *pdev)
146 int ret; 146 int ret;
147 147
148 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); 148 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
149 if (gpio == NULL) 149 if (!gpio)
150 return -ENOMEM; 150 return -ENOMEM;
151 151
152 gpio->da9055 = dev_get_drvdata(pdev->dev.parent); 152 gpio->da9055 = dev_get_drvdata(pdev->dev.parent);
diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c
index 443518f63f15..6b8115f34208 100644
--- a/drivers/gpio/gpio-kempld.c
+++ b/drivers/gpio/gpio-kempld.c
@@ -156,7 +156,7 @@ static int kempld_gpio_probe(struct platform_device *pdev)
156 } 156 }
157 157
158 gpio = devm_kzalloc(dev, sizeof(*gpio), GFP_KERNEL); 158 gpio = devm_kzalloc(dev, sizeof(*gpio), GFP_KERNEL);
159 if (gpio == NULL) 159 if (!gpio)
160 return -ENOMEM; 160 return -ENOMEM;
161 161
162 gpio->pld = pld; 162 gpio->pld = pld;
diff --git a/drivers/gpio/gpio-mc33880.c b/drivers/gpio/gpio-mc33880.c
index 4e3e160e5db2..a431604c9e67 100644
--- a/drivers/gpio/gpio-mc33880.c
+++ b/drivers/gpio/gpio-mc33880.c
@@ -151,7 +151,7 @@ static int mc33880_remove(struct spi_device *spi)
151 struct mc33880 *mc; 151 struct mc33880 *mc;
152 152
153 mc = spi_get_drvdata(spi); 153 mc = spi_get_drvdata(spi);
154 if (mc == NULL) 154 if (!mc)
155 return -ENODEV; 155 return -ENODEV;
156 156
157 gpiochip_remove(&mc->chip); 157 gpiochip_remove(&mc->chip);