Input: twl4030_keypad - fix handling of platform_get_irq() error
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 16 Sep 2020 00:56:19 +0000 (17:56 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 16 Sep 2020 17:42:15 +0000 (10:42 -0700)
commitc277e1f0dc3c7d7b5b028e20dd414df241642036
tree98f557f8448cb870efda6eea7dbfccbdd092027c
parent4738dd1992fa13acfbbd71800c71c612f466fa44
Input: twl4030_keypad - fix handling of platform_get_irq() error

platform_get_irq() returns -ERRNO on error.  In such case casting to
unsigned and comparing to 0 would pass the check.

Fixes: 7abf38d6d13c ("Input: twl4030-keypad - add device tree support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200828145744.3636-3-krzk@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/twl4030_keypad.c