aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorDarren Jenkins <darrenrjenkins@gmail.com>2010-02-02 07:43:45 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-03 23:16:47 -0500
commitf0f4d641d4ebfeb4194e9c26dfa6286802e2e8d1 (patch)
tree60906119f455a6d85b49e45a4f9bd1f46e377f34 /drivers/isdn
parente23e11792a77c7d54f363841cd5e33074fb0c8c9 (diff)
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 <darrenrjenkins@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/hardware/mISDN/mISDNinfineon.c1
1 files changed, 1 insertions, 0 deletions
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)
1133 if (err) { 1133 if (err) {
1134 kfree(sc); 1134 kfree(sc);
1135 release_card(card); 1135 release_card(card);
1136 break;
1136 } else 1137 } else
1137 card->sc[i - 1] = sc; 1138 card->sc[i - 1] = sc;
1138 } 1139 }