提交 626ae83b 编写于 作者: A Amit Choudhary 提交者: Mauro Carvalho Chehab

V4L/DVB (4738): Bt8xx/dvb-bt8xx.c: check kmalloc() return value.

Check the return value of kmalloc() in function frontend_init(), 
in file drivers/media/dvb/bt8xx/dvb-bt8xx.c.
Signed-off-by: NAmit Choudhary <amit2030@gmail.com>
Signed-off-by: NManu Abraham <manu@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 c071fab4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册