From: Darren Jenkins Date: Tue, 2 Feb 2010 12:43:45 +0000 (+0000) Subject: hardware/mISDN/mISDNinfineon.c: bail out of loop on error X-Git-Tag: MMI-PSA29.97-13-9~24841^2~435 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f0f4d641d4ebfeb4194e9c26dfa6286802e2e8d1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git hardware/mISDN/mISDNinfineon.c: bail out of loop on error 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 Signed-off-by: Darren Jenkins Cc: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c b/drivers/isdn/hardware/mISDN/mISDNinfineon.c index 62441ba53b95..36c6c616a655 100644 --- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c +++ b/drivers/isdn/hardware/mISDN/mISDNinfineon.c @@ -1133,6 +1133,7 @@ inf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (err) { kfree(sc); release_card(card); + break; } else card->sc[i - 1] = sc; }