* [patch 2/4] hardware/mISDN/mISDNinfineon.c: bail out of loop on error
@ 2010-02-02 22:43 akpm
2010-02-04 4:17 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2010-02-02 22:43 UTC (permalink / raw)
To: isdn; +Cc: netdev, akpm, darrenrjenkins
From: Darren Jenkins <darrenrjenkins@gmail.com>
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>
---
drivers/isdn/hardware/mISDN/mISDNinfineon.c | 1 +
1 file changed, 1 insertion(+)
diff -puN drivers/isdn/hardware/mISDN/mISDNinfineon.c~hardware-misdn-misdninfineonc-bail-out-of-loop-on-error drivers/isdn/hardware/mISDN/mISDNinfineon.c
--- a/drivers/isdn/hardware/mISDN/mISDNinfineon.c~hardware-misdn-misdninfineonc-bail-out-of-loop-on-error
+++ a/drivers/isdn/hardware/mISDN/mISDNinfineon.c
@@ -1133,6 +1133,7 @@ inf_probe(struct pci_dev *pdev, const st
if (err) {
kfree(sc);
release_card(card);
+ break;
} else
card->sc[i - 1] = sc;
}
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 2/4] hardware/mISDN/mISDNinfineon.c: bail out of loop on error
2010-02-02 22:43 [patch 2/4] hardware/mISDN/mISDNinfineon.c: bail out of loop on error akpm
@ 2010-02-04 4:17 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-02-04 4:17 UTC (permalink / raw)
To: akpm; +Cc: isdn, netdev, darrenrjenkins
From: akpm@linux-foundation.org
Date: Tue, 02 Feb 2010 14:43:45 -0800
> From: Darren Jenkins <darrenrjenkins@gmail.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-04 4:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 22:43 [patch 2/4] hardware/mISDN/mISDNinfineon.c: bail out of loop on error akpm
2010-02-04 4:17 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).