summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/ir-nec-decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/IR/ir-nec-decoder.c')
-rw-r--r--drivers/media/IR/ir-nec-decoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c
index 28d77356355..9d1ada95aa7 100644
--- a/drivers/media/IR/ir-nec-decoder.c
+++ b/drivers/media/IR/ir-nec-decoder.c
@@ -142,6 +142,9 @@ static int ir_nec_decode(struct input_dev *input_dev,
if (!data)
return -EINVAL;
+ if (!data->enabled)
+ return 0;
+
/* Except for the initial event, what matters is the previous bit */
bit = (ev->type & IR_PULSE) ? 1 : 0;