public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.19-rc1] drivers/media/dvb/bt8xx/dvb-bt8xx.c: check kmalloc() return value.
@ 2006-10-09  6:10 Amit Choudhary
  2006-10-09  8:34 ` Manu Abraham
  2006-10-09  8:37 ` Olaf Hering
  0 siblings, 2 replies; 7+ messages in thread
From: Amit Choudhary @ 2006-10-09  6:10 UTC (permalink / raw)
  To: Linux Kernel

Description: Check the return value of kmalloc() in function frontend_init(), in file drivers/media/dvb/bt8xx/dvb-bt8xx.c.

Signed-off-by: Amit Choudhary <amit2030@gmail.com>

diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index fb6c4cc..14e69a7 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -665,6 +665,10 @@ static void frontend_init(struct dvb_bt8
 	case BTTV_BOARD_TWINHAN_DST:
 		/*	DST is not a frontend driver !!!		*/
 		state = (struct dst_state *) kmalloc(sizeof (struct dst_state), GFP_KERNEL);
+		if (!state) {
+			printk("dvb_bt8xx: No memory\n");
+			break;
+		}
 		/*	Setup the Card					*/
 		state->config = &dst_config;
 		state->i2c = card->i2c_adapter;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-10 16:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09  6:10 [PATCH 2.6.19-rc1] drivers/media/dvb/bt8xx/dvb-bt8xx.c: check kmalloc() return value Amit Choudhary
2006-10-09  8:34 ` Manu Abraham
2006-10-10  8:01   ` [stable] " Greg KH
2006-10-10 11:18     ` Manu Abraham
2006-10-10 16:31       ` Greg KH
2006-10-09  8:37 ` Olaf Hering
2006-10-09  8:44   ` Manu Abraham

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