Skip to content

Commit 2106d1c

Browse files
krzkgregkh
authored andcommitted
Input: ep93xx_keypad - fix handling of platform_get_irq() error
[ Upstream commit 7d50f66 ] platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes: 60214f0 ("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>
1 parent b205eef commit 2106d1c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/input/keyboard/ep93xx_keypad.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ static int ep93xx_keypad_probe(struct platform_device *pdev)
250250
}
251251

252252
keypad->irq = platform_get_irq(pdev, 0);
253-
if (!keypad->irq) {
254-
err = -ENXIO;
253+
if (keypad->irq < 0) {
254+
err = keypad->irq;
255255
goto failed_free;
256256
}
257257

0 commit comments

Comments
 (0)