Skip to content

Commit

Permalink
V4L/DVB (13576): ir-common: fix an oops caused by the usage of an ini…
Browse files Browse the repository at this point in the history
…tialized 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>
  • Loading branch information
Mauro Carvalho Chehab committed Dec 16, 2009
1 parent b779974 commit 05395a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/common/ir-keytable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05395a3

Please sign in to comment.