diff mbox

[em28xx] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 IP: [<ffffffffa00997be>] :ir_common:ir_input_free+0x26/0x3e

Message ID 4B1B0094.6080000@redhat.com (mailing list archive)
State Accepted
Delegated to: Mauro Carvalho Chehab
Headers show

Commit Message

Mauro Carvalho Chehab Dec. 6, 2009, 12:53 a.m. UTC
None
diff mbox

Patch

diff --git a/linux/drivers/media/common/ir-keytable.c b/linux/drivers/media/common/ir-keytable.c
--- a/linux/drivers/media/common/ir-keytable.c
+++ b/linux/drivers/media/common/ir-keytable.c
@@ -427,6 +427,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;