From: Krzysztof Kozlowski Date: Wed, 16 Sep 2020 00:51:05 +0000 (-0700) Subject: Input: ep93xx_keypad - fix handling of platform_get_irq() error X-Git-Tag: v5.15~74^2~54^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d50f6656dacf085a00beeedbc48b19a37d17881;p=platform%2Fkernel%2Flinux-starfive.git Input: ep93xx_keypad - fix handling of platform_get_irq() error 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 Link: https://lore.kernel.org/r/20200828145744.3636-1-krzk@kernel.org Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index 7c70492d9d6b..f831f01501d5 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -250,8 +250,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; }