]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: remove explicit comparison with 0
authorSaiyam Doshi <saiyamdoshi.in@gmail.com>
Sat, 7 Sep 2019 17:39:10 +0000 (23:09 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Sep 2019 23:05:29 +0000 (00:05 +0100)
commit2efc6bfadb0b9c873e11ab8da37f4f69aa215d25
tree06a3c905052b37b659e6868bf475f85937ae988d
parentaba30f6f312ccb82b44eaf53db1047e023a97d5c
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>
drivers/gpio/gpiolib.c