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: firefly_0821_release~9833^2~3055^2~435 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f0f4d641d4ebfeb4194e9c26dfa6286802e2e8d1;p=firefly-linux-kernel-4.4.55.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; }