Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: use (!foo) instead of (foo == NULL)

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Varka Bhadram and committed by
Linus Walleij
afeb7b45 4878b466

+7 -7
+2 -2
drivers/gpio/gpio-adp5588.c
··· 367 367 struct gpio_chip *gc; 368 368 int ret, i, revid; 369 369 370 - if (pdata == NULL) { 370 + if (!pdata) { 371 371 dev_err(&client->dev, "missing platform data\n"); 372 372 return -ENODEV; 373 373 } ··· 379 379 } 380 380 381 381 dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL); 382 - if (dev == NULL) 382 + if (!dev) 383 383 return -ENOMEM; 384 384 385 385 dev->client = client;
+1 -1
drivers/gpio/gpio-arizona.c
··· 103 103 104 104 arizona_gpio = devm_kzalloc(&pdev->dev, sizeof(*arizona_gpio), 105 105 GFP_KERNEL); 106 - if (arizona_gpio == NULL) 106 + if (!arizona_gpio) 107 107 return -ENOMEM; 108 108 109 109 arizona_gpio->arizona = arizona;
+1 -1
drivers/gpio/gpio-da9052.c
··· 212 212 int ret; 213 213 214 214 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); 215 - if (gpio == NULL) 215 + if (!gpio) 216 216 return -ENOMEM; 217 217 218 218 gpio->da9052 = dev_get_drvdata(pdev->dev.parent);
+1 -1
drivers/gpio/gpio-da9055.c
··· 146 146 int ret; 147 147 148 148 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); 149 - if (gpio == NULL) 149 + if (!gpio) 150 150 return -ENOMEM; 151 151 152 152 gpio->da9055 = dev_get_drvdata(pdev->dev.parent);
+1 -1
drivers/gpio/gpio-kempld.c
··· 156 156 } 157 157 158 158 gpio = devm_kzalloc(dev, sizeof(*gpio), GFP_KERNEL); 159 - if (gpio == NULL) 159 + if (!gpio) 160 160 return -ENOMEM; 161 161 162 162 gpio->pld = pld;
+1 -1
drivers/gpio/gpio-mc33880.c
··· 151 151 struct mc33880 *mc; 152 152 153 153 mc = spi_get_drvdata(spi); 154 - if (mc == NULL) 154 + if (!mc) 155 155 return -ENODEV; 156 156 157 157 gpiochip_remove(&mc->chip);