aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe JAILLET2017-01-27 12:56:42 +0100
committerLinus Walleij2017-01-31 15:44:16 +0100
commit3988d663c02fc050afddb78953e8b0cad83e9905 (patch)
treea407fd908751c0018bdcf0f95e8ad95b8c687bcb
parent7354740666cd07b089af81eb91f0d4a8f1253eb9 (diff)
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>
-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);