diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 0042367b060cc5b5cf578f1691ce43248a2a4747..ccd267f131fafc6bddb8a85ebe8ff7859fa4b7b2 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;