summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/rc/redrat3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c
index 0042367..ccd267f 100644
--- a/drivers/media/rc/redrat3.c
+++ b/drivers/media/rc/redrat3.c
@@ -663,7 +663,8 @@ static int redrat3_get_ir_data(struct redrat3_dev *rr3, unsigned len)
goto out;
}
- if (rr3->bytes_read < be16_to_cpu(rr3->irdata.header.length))
+ if (rr3->bytes_read < be16_to_cpu(rr3->irdata.header.length) +
+ sizeof(struct redrat3_header))
/* we're still accumulating data */
return 0;