projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2db3a8f
)
mfd: ipaq-micro: Fix error check return value of platform_get_irq()
author
Lv Ruyi
<lv.ruyi@zte.com.cn>
Tue, 12 Apr 2022 08:53:05 +0000
(08:53 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:07 +0000
(10:23 +0200)
[ 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:
dcc21cc09e3c
("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>
drivers/mfd/ipaq-micro.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/ipaq-micro.c
b/drivers/mfd/ipaq-micro.c
index
e92eeeb
..
4cd5ecc
100644
(file)
--- a/
drivers/mfd/ipaq-micro.c
+++ b/
drivers/mfd/ipaq-micro.c
@@
-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",