1
0
Fork 0

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>
hifive-unleashed-5.1
Darren Jenkins 2010-02-02 12:43:45 +00:00 committed by David S. Miller
parent e23e11792a
commit f0f4d641d4
1 changed files with 1 additions and 0 deletions

View 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;
}