mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 01:36:58 -05:00
mfd: ipaq-micro: Fix error check return value of platform_get_irq()
[ Upstream commit 3b49ae380ce1a3054e0c505dd9a356b82a5b48e8 ]
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 <[email protected]>
Signed-off-by: Lv Ruyi <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
8c4eeab726
commit
829ea47487
1 changed files with 1 additions and 1 deletions
|
|
@ -407,7 +407,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