public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] : hardware/mISDN/mISDNinfineon.c: Bail out of loop on error
@ 2010-01-08 14:40 Darren Jenkins
  0 siblings, 0 replies; only message in thread
From: Darren Jenkins @ 2010-01-08 14:40 UTC (permalink / raw)
  To: Kernel Janitors, keil; +Cc: Linux Kernel Mailing List


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> 

diff --git drivers/isdn/hardware/mISDN/mISDNinfineon.c drivers/isdn/hardware/mISDN/mISDNinfineon.c
index 62441ba..36c6c61 100644
--- drivers/isdn/hardware/mISDN/mISDNinfineon.c
+++ 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;
 		}



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-08 14:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 14:40 [PATCH] : hardware/mISDN/mISDNinfineon.c: Bail out of loop on error Darren Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox