Commit 5b999fd04af95e2cb624aaf6a7637561572b2d96
Committed by
David S. Miller
1 parent
7be7e93268
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
drivers/isdn/hisax/isurf.c
... | ... | @@ -231,6 +231,11 @@ |
231 | 231 | } |
232 | 232 | pnp_disable_dev(pnp_d); |
233 | 233 | err = pnp_activate_dev(pnp_d); |
234 | + if (err < 0) { | |
235 | + pr_warn("%s: pnp_activate_dev ret=%d\n", | |
236 | + __func__, err); | |
237 | + return 0; | |
238 | + } | |
234 | 239 | cs->hw.isurf.reset = pnp_port_start(pnp_d, 0); |
235 | 240 | cs->hw.isurf.phymem = pnp_mem_start(pnp_d, 1); |
236 | 241 | cs->irq = pnp_irq(pnp_d, 0); |