diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-09 15:50:10 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-09 15:50:10 -0300 |
commit | 6c70dd66537ed4c619c022cb0d379da1c259b267 (patch) | |
tree | 90c7309a5c62e4a4506339d06b6c06115d937cb5 /linux/drivers/media/dvb/bt8xx | |
parent | c783703287243700667bd60092fdfbade0e15491 (diff) | |
download | mediapointer-dvb-s2-6c70dd66537ed4c619c022cb0d379da1c259b267.tar.gz mediapointer-dvb-s2-6c70dd66537ed4c619c022cb0d379da1c259b267.tar.bz2 |
Bt8xx/dvb-bt8xx.c: check kmalloc() return value.
From: Amit Choudhary <amit2030@gmail.com>
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>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index d4cac5a7b..dfe79310a 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -666,6 +666,10 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) 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; |