[media] tm6000: using an uninitialized variable in debug code
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Dec 2011 05:17:36 +0000 (02:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 30 Dec 2011 19:32:48 +0000 (17:32 -0200)
dprintk() dereferences "ir".  I'm not sure why gcc doesn't complain
about this.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/tm6000/tm6000-input.c

index 8d92527..7844607 100644 (file)
@@ -408,13 +408,13 @@ int tm6000_ir_init(struct tm6000_core *dev)
        if (!dev->ir_codes)
                return 0;
 
-       dprintk(2, "%s\n",__func__);
-
        ir = kzalloc(sizeof(*ir), GFP_ATOMIC);
        rc = rc_allocate_device();
        if (!ir || !rc)
                goto out;
 
+       dprintk(2, "%s\n", __func__);
+
        /* record handles to ourself */
        ir->dev = dev;
        dev->ir = ir;