Skip to contentSkip to conversation

hardware/mISDN/mISDNinfineon.c: bail out of loop on error

PATCH Applied [email protected] 2 participants 2 messages Feb 2, 2010 – Feb 4, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/4 hardware/mISDN/mISDNinfineon.c: bail out of loop on error

From: Darren Jenkins <[email protected]>

If setup_instance() fails we kfree() the card, and then use it in the next loop iteration. So lets bail out of the loop instead.

Coverity CID: 13357

---

 drivers/isdn/hardware/mISDN/mISDNinfineon.c |    1 +
 1 file changed, 1 insertion(+)
drivers/isdn/hardware/mISDN/mISDNinfineon.c renamed from drivers/isdn/hardware/mISDN/mISDNinfineon.c~hardware-misdn-misdninfineonc-bail-out-of-loop-on-error +1 -0
diff -puN drivers/isdn/hardware/mISDN/mISDNinfineon.c~hardware-misdn-misdninfineonc-bail-out-of-loop-on-error drivers/isdn/hardware/mISDN/mISDNinfineon.c
@@ -1133,6 +1133,7 @@ inf_probe(struct pci_dev *pdev, const st
 			if (err) {
 				kfree(sc);
 				release_card(card);
+				break;
 			} else
 				card->sc[i - 1] = sc;
 		}

_