Skip to content

Commit

Permalink
hardware/mISDN/mISDNinfineon.c: bail out of loop on error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darren Jenkins authored and David S. Miller committed Feb 4, 2010
1 parent e23e117 commit f0f4d64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/isdn/hardware/mISDN/mISDNinfineon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f0f4d64

Please sign in to comment.