[PATCH 4/4] ipmi: bt-bmc: Check IRQ number correctly

[email protected]
Newsgroups org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: bui duc phuc <[email protected]>

bt_bmc->irq does not have a value of zero, so check for a positive
IRQ number when selecting between IRQ and timer-based handling.

Signed-off-by: bui duc phuc <[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 99b38300f9e1..68bf34715387 100644
--- a/drivers/char/ipmi/bt-bmc.c
+++ b/drivers/char/ipmi/bt-bmc.c
@@ -439,7 +439,7 @@ static int bt_bmc_probe(struct platform_device *pdev)
 	if (rc)
 		return rc;
 
-	if (bt_bmc->irq >= 0) {
+	if (bt_bmc->irq > 0) {
 		dev_info(dev, "Using IRQ %d\n", bt_bmc->irq);
 	} else {
 		dev_info(dev, "No IRQ; using timer\n");
-- 
2.43.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.