]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ISDN: Add check for return value of pnp_activate_dev()
authorKarsten Keil <kkeil@linux-pingi.de>
Thu, 12 Jul 2012 07:01:10 +0000 (07:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2012 16:40:54 +0000 (09:40 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hisax/isurf.c

index ea27172152967d3545924158a169b05f465cd63e..c1530fe248c265a927f29009db48c3014134880a 100644 (file)
@@ -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);