hardware/mISDN/mISDNinfineon.c: bail out of loop on error
authorDarren Jenkins <[email protected]>
Tue, 2 Feb 2010 12:43:45 +0000 (12:43 +0000)
committerDavid S. Miller <[email protected]>
Thu, 4 Feb 2010 04:16:47 +0000 (20:16 -0800)
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 <[email protected]>
Cc: Karsten Keil <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/isdn/hardware/mISDN/mISDNinfineon.c

index 62441ba53b95c1b033a7744805c9d535eda722c1..36c6c616a6553355796233ff91483c7f921ad6e5 100644 (file)
@@ -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;
                }