summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorSaiyam Doshi <saiyamdoshi.in@gmail.com>2019-09-07 19:39:10 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-09-12 01:05:29 +0200
commit2efc6bfadb0b9c873e11ab8da37f4f69aa215d25 (patch)
tree06a3c905052b37b659e6868bf475f85937ae988d /drivers/gpio/gpiolib.c
parentgpio: creg-snps: use devm_platform_ioremap_resource() to simplify code (diff)
downloadlinux-2efc6bfadb0b9c873e11ab8da37f4f69aa215d25.tar.xz
linux-2efc6bfadb0b9c873e11ab8da37f4f69aa215d25.zip
gpio: remove explicit comparison with 0
No need to compare return value with 0. In case of non-zero return value, the if condition will be true. This makes intent a bit more clear to the reader. "if (x) then", compared to "if (x is not zero) then". Signed-off-by: Saiyam Doshi <saiyamdoshi.in@gmail.com> Link: https://lore.kernel.org/r/20190907173910.GA9547@SD Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to '')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f5b2649e2893..158e327a1285 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -851,7 +851,7 @@ static irqreturn_t lineevent_irq_thread(int irq, void *p)
}
ret = kfifo_put(&le->events, ge);
- if (ret != 0)
+ if (ret)
wake_up_poll(&le->wait, EPOLLIN);
return IRQ_HANDLED;