From: Amit Choudhary Date: Mon, 9 Oct 2006 18:50:10 +0000 (-0300) Subject: V4L/DVB (4738): Bt8xx/dvb-bt8xx.c: check kmalloc() return value. X-Git-Tag: MMI-PSA29.97-13-9~46043^2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=626ae83bb24927ca015503448f0199842ae2e8da;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Amit Choudhary Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index fb6c4cc8477d..14e69a736eda 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_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;