diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-06 12:32:49 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-16 03:18:09 +0100 |
commit | 05395a3d86a928d374c970a0b35a6a711072f86c (patch) | |
tree | 72fbd7f0a6e21702628506faff5f88b57d43ed3f | |
parent | V4L/DVB (13575): em28xx: Use the complete address/command RC5 code for WinTV ... (diff) | |
download | linux-05395a3d86a928d374c970a0b35a6a711072f86c.tar.xz linux-05395a3d86a928d374c970a0b35a6a711072f86c.zip |
V4L/DVB (13576): ir-common: fix an oops caused by the usage of an initialized drvdata
As reported by Sander Eikelenboom <linux@eikelemboon.it>:
> Tried to update my v4l-dvb modules today, but got a bug with my pinnacle
> card, seems to be related to the recent changes in the ir code.
>
> Dec 5 23:30:25 security kernel: [ 5.735698] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
> Dec 5 23:30:25 security kernel: [ 5.735716] IP: [<ffffffffa00997be>] :ir_common:ir_input_free+0x26/0x3e
Thanks-to: Sander Eikelenboom <linux@eikelemboon.it> for reporting and testing the fix.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/common/ir-keytable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/common/ir-keytable.c b/drivers/media/common/ir-keytable.c index 26ce5bc2fdd5..ceef0e82fb4b 100644 --- a/drivers/media/common/ir-keytable.c +++ b/drivers/media/common/ir-keytable.c @@ -419,6 +419,9 @@ void ir_input_free(struct input_dev *dev) { struct ir_scancode_table *rc_tab = input_get_drvdata(dev); + if (!rc_tab) + return; + IR_dprintk(1, "Freed keycode table\n"); rc_tab->size = 0; |