1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Saiyam Doshi 2019-09-07 23:09:10 +05:30 committed by Linus Walleij
parent aba30f6f31
commit 2efc6bfadb
1 changed files with 1 additions and 1 deletions

View File

@ -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;