summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-09-16 03:51:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-10-29 11:07:12 +0300
commit4cf86bec24fad44533462d12cb893f864ac7bba0 (patch)
treeaaa6a88c59fc48a10e2bc223f2ff72c75a8bafca /drivers/input/keyboard
parent369c1bb55e8bcb04fddd79f5f43f5562a8b6ded1 (diff)
downloadlinux-4cf86bec24fad44533462d12cb893f864ac7bba0.tar.xz
Input: ep93xx_keypad - fix handling of platform_get_irq() error
[ Upstream commit 7d50f6656dacf085a00beeedbc48b19a37d17881 ] platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 60214f058f44 ("Input: ep93xx_keypad - update driver to new core support") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200828145744.3636-1-krzk@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/ep93xx_keypad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c
index f77b295e0123..01788a78041b 100644
--- a/drivers/input/keyboard/ep93xx_keypad.c
+++ b/drivers/input/keyboard/ep93xx_keypad.c
@@ -257,8 +257,8 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
}
keypad->irq = platform_get_irq(pdev, 0);
- if (!keypad->irq) {
- err = -ENXIO;
+ if (keypad->irq < 0) {
+ err = keypad->irq;
goto failed_free;
}