Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b999fd0 authored by Karsten Keil's avatar Karsten Keil Committed by David S. Miller
Browse files

ISDN: Add check for return value of pnp_activate_dev()



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: default avatarKarsten Keil <kkeil@linux-pingi.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7be7e932
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -231,6 +231,11 @@ setup_isurf(struct IsdnCard *card)
				}
				}
				pnp_disable_dev(pnp_d);
				pnp_disable_dev(pnp_d);
				err = pnp_activate_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.reset = pnp_port_start(pnp_d, 0);
				cs->hw.isurf.phymem = pnp_mem_start(pnp_d, 1);
				cs->hw.isurf.phymem = pnp_mem_start(pnp_d, 1);
				cs->irq = pnp_irq(pnp_d, 0);
				cs->irq = pnp_irq(pnp_d, 0);