[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <68eb2d0c02e1da7f91d522219e32780a7b7996a8.1510805781.git.arvind.yadav.cs@gmail.com>
Date: Thu, 16 Nov 2017 09:57:25 +0530
From: Arvind Yadav <arvind.yadav.cs@...il.com>
To: isdn@...ux-pingi.de, davem@...emloft.net,
stephen@...workplumber.org, johannes.berg@...el.com
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH 08/12] isdn: hisax: Fix pnp_irq's error checking for setup_isurf
The pnp_irq() function returns -1 if an error occurs.
pnp_irq() error checking for zero is not correct.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
drivers/isdn/hisax/isurf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
index 1399ddd..53e299b 100644
--- a/drivers/isdn/hisax/isurf.c
+++ b/drivers/isdn/hisax/isurf.c
@@ -238,7 +238,7 @@ int setup_isurf(struct IsdnCard *card)
cs->hw.isurf.reset = pnp_port_start(pnp_d, 0);
cs->hw.isurf.phymem = pnp_mem_start(pnp_d, 1);
cs->irq = pnp_irq(pnp_d, 0);
- if (!cs->irq || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) {
+ if (cs->irq == -1 || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) {
printk(KERN_ERR "ISurfPnP:some resources are missing %d/%x/%lx\n",
cs->irq, cs->hw.isurf.reset, cs->hw.isurf.phymem);
pnp_disable_dev(pnp_d);
--
1.9.1
Powered by blists - more mailing lists