]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (4738): Bt8xx/dvb-bt8xx.c: check kmalloc() return value.
authorAmit Choudhary <amit2030@gmail.com>
Mon, 9 Oct 2006 18:50:10 +0000 (15:50 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 14 Oct 2006 03:44:08 +0000 (00:44 -0300)
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>
drivers/media/dvb/bt8xx/dvb-bt8xx.c

index fb6c4cc8477db818d04fb061f0893584b428690e..14e69a736edae5f50bf3207b9c1b0a205199faff 100644 (file)
@@ -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;