The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Signed-off-by: Arvind Yadav <[email protected]>
---
drivers/char/ipmi/bt-bmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c
index 70d434b..7566683 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -410,7 +410,7 @@ static int bt_bmc_config_irq(struct bt_bmc *bt_bmc,
int rc;
bt_bmc->irq = platform_get_irq(pdev, 0);
- if (!bt_bmc->irq)
+ if (bt_bmc->irq < 0)
return -ENODEV;
rc = devm_request_irq(dev, bt_bmc->irq, bt_bmc_irq, IRQF_SHARED,
--
2.7.4
From 1586069785993620774@xxx Wed Dec 06 21:00:18 +0000 2017
X-GM-THRID: 1585968957136333436
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread