From: Christophe JAILLET Date: Fri, 27 Jan 2017 11:56:42 +0000 (+0100) Subject: gpiolib: Fix a WARN_ON that can never trigger X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3988d663c02fc050afddb78953e8b0cad83e9905;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git gpiolib: Fix a WARN_ON that can never trigger "if (!x) WARN_ON(x)" can never trigger. Signed-off-by: Christophe JAILLET Signed-off-by: Linus Walleij --- 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);