summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-01-27 14:56:42 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-01-31 17:44:16 +0300
commit3988d663c02fc050afddb78953e8b0cad83e9905 (patch)
treea407fd908751c0018bdcf0f95e8ad95b8c687bcb /drivers/gpio
parent7354740666cd07b089af81eb91f0d4a8f1253eb9 (diff)
downloadlinux-3988d663c02fc050afddb78953e8b0cad83e9905.tar.xz
gpiolib: Fix a WARN_ON that can never trigger
"if (!x) WARN_ON(x)" can never trigger. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 18a173fc4a21..385df5241e5d 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1422,8 +1422,7 @@ void devm_gpiochip_remove(struct device *dev, struct gpio_chip *chip)
ret = devres_release(dev, devm_gpio_chip_release,
devm_gpio_chip_match, chip);
- if (!ret)
- WARN_ON(ret);
+ WARN_ON(ret);
}
EXPORT_SYMBOL_GPL(devm_gpiochip_remove);