Skip to content

Commit

Permalink
V4L/DVB (4738): Bt8xx/dvb-bt8xx.c: check kmalloc() return value.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Choudhary authored and Mauro Carvalho Chehab committed Oct 14, 2006
1 parent c071fab commit 626ae83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/dvb/bt8xx/dvb-bt8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,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;
Expand Down

0 comments on commit 626ae83

Please sign in to comment.