Skip to content

Commit

Permalink
Input: ep93xx_keypad - fix handling of platform_get_irq() error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Krzysztof Kozlowski authored and Dmitry Torokhov committed Sep 16, 2020
1 parent d04afe1 commit 7d50f66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/keyboard/ep93xx_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7d50f66

Please sign in to comment.