summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/bt8xx
diff options
context:
space:
mode:
authorAmit Choudhary <amit2030@gmail.com>2006-10-09 18:50:10 (GMT)
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-14 03:44:08 (GMT)
commit626ae83bb24927ca015503448f0199842ae2e8da (patch)
tree0c2bd3890188991d4c5bc9167b6028832258984b /drivers/media/dvb/bt8xx
parentc071fab453f7b181c49d92d06d936bb243ef1932 (diff)
downloadlinux-fsl-qoriq-626ae83bb24927ca015503448f0199842ae2e8da.tar.xz
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 <amit2030@gmail.com> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/bt8xx')
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c4
1 files changed, 4 insertions, 0 deletions
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_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;