mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
Input: ep93xx_keypad - fix handling of platform_get_irq() error
[ Upstream commit7d50f6656d] platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check. Fixes:60214f058f("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>
This commit is contained in:
committed by
Chris
parent
1edcedae92
commit
630978f2d4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user