mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-26 04:16:39 +00:00
mfd: ipaq-micro: Fix error check return value of platform_get_irq()
[ Upstream commit3b49ae380c
] platform_get_irq() return negative value on failure, so null check of irq is incorrect. Fix it by comparing whether it is less than zero. Fixes:dcc21cc09e
("mfd: Add driver for Atmel Microcontroller on iPaq h3xxx") Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20220412085305.2533030-1-lv.ruyi@zte.com.cn Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
12d6799ef5
commit
4cf806d676
1 changed files with 1 additions and 1 deletions
|
@ -403,7 +403,7 @@ static int __init micro_probe(struct platform_device *pdev)
|
|||
micro_reset_comm(micro);
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!irq)
|
||||
if (irq < 0)
|
||||
return -EINVAL;
|
||||
ret = devm_request_irq(&pdev->dev, irq, micro_serial_isr,
|
||||
IRQF_SHARED, "ipaq-micro",
|
||||
|
|
Loading…
Reference in a new issue