]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] tm6000: fix OOPS at tm6000_ir_int_stop() and tm6000_ir_int_start()
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 30 Nov 2011 17:57:28 +0000 (14:57 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 30 Nov 2011 18:49:45 +0000 (16:49 -0200)
[ 3755.608233] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[ 3755.616360] IP: [<ffffffffa03b80b7>] tm6000_ir_int_stop+0x10/0x1b [tm6000]

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

index e3467d4245cbcd8088bbb68bd85d7a8c42737a8c..af4bcf5288a9aa1e5abe6f9a03c669ae30d39827 100644 (file)
@@ -377,6 +377,9 @@ int tm6000_ir_int_start(struct tm6000_core *dev)
 {
        struct tm6000_IR *ir = dev->ir;
 
+       if (!ir)
+               return;
+
        return __tm6000_ir_int_start(ir->rc);
 }
 
@@ -384,6 +387,9 @@ void tm6000_ir_int_stop(struct tm6000_core *dev)
 {
        struct tm6000_IR *ir = dev->ir;
 
+       if (!ir || !ir->rc)
+               return;
+
        __tm6000_ir_int_stop(ir->rc);
 }