netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ISDN:Add check for return value of pnp_activate_dev()
@ 2012-07-12 17:01 Karsten Keil
  0 siblings, 0 replies; 2+ messages in thread
From: Karsten Keil @ 2012-07-12 17:01 UTC (permalink / raw)
  To: netdev

pnp_activate_dev() return value needs to be checked to make sure that
following calls calls to the PNP functions do work correctly.
Fix for report #44491 on bugzilla.kernel.org.

Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>
---
 drivers/isdn/hisax/isurf.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
index ea27172..c1530fe 100644
--- a/drivers/isdn/hisax/isurf.c
+++ b/drivers/isdn/hisax/isurf.c
@@ -231,6 +231,11 @@ setup_isurf(struct IsdnCard *card)
 				}
 				pnp_disable_dev(pnp_d);
 				err = pnp_activate_dev(pnp_d);
+				if (err < 0) {
+					pr_warn("%s: pnp_activate_dev ret=%d\n",
+						__func__, err);
+					return 0;
+				}
 				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);
-- 
1.7.7

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ISDN:Add check for return value of pnp_activate_dev()
       [not found] <1342110562-7774-1-git-send-email-kkeil@linux-pingi.de>
@ 2012-07-18 16:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-18 16:42 UTC (permalink / raw)
  To: kkeil; +Cc: netdev, alan, rucsoftsec

From: Karsten Keil <kkeil@linux-pingi.de>
Date: Thu, 12 Jul 2012 18:29:22 +0200

> pnp_activate_dev() return value needs to be checked to make sure that
> following calls calls to the PNP functions do work correctly.
> Fix for report #44491 on bugzilla.kernel.org.
> 
> Signed-off-by: Karsten Keil <kkeil@linux-pingi.de>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-18 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12 17:01 [PATCH] ISDN:Add check for return value of pnp_activate_dev() Karsten Keil
     [not found] <1342110562-7774-1-git-send-email-kkeil@linux-pingi.de>
2012-07-18 16:42 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).