mfd: ipaq-micro: Fix error check return value of platform_get_irq()
authorLv Ruyi <lv.ruyi@zte.com.cn>
Tue, 12 Apr 2022 08:53:05 +0000 (08:53 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:21:15 +0000 (10:21 +0200)
commit17d9d7d26406d8c524b547c3cfd6c727f464cdf6
tree45d490cac88c5546e8ee65bc6a52ebdfe79c76a3
parent82c6c8a66c2e6041255cc1a65ae390182d587bb0
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: 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