aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/common/ir-keytable.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/common/ir-keytable.c')
-rw-r--r--drivers/media/common/ir-keytable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/common/ir-keytable.c b/drivers/media/common/ir-keytable.c
index 26ce5bc2fdd..ceef0e82fb4 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;