]> git.itanic.dy.fi Git - linux-stable/commitdiff
media: igorplugusb: receiver overflow should be reported
authorSean Young <sean@mess.org>
Tue, 30 Nov 2021 22:58:19 +0000 (23:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 07:47:37 +0000 (08:47 +0100)
[ Upstream commit 8fede658e7ddb605bbd68ed38067ddb0af033db4 ]

Without this, some IR will be missing mid-stream and we might decode
something which never really occurred.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/rc/igorplugusb.c

index 5cf983be07a207f896dc11621095e21ebd91c79a..0f4c4c39bf6da384bb6df14c8bf6b64bda6cc17e 100644 (file)
@@ -73,9 +73,11 @@ static void igorplugusb_irdata(struct igorplugusb *ir, unsigned len)
        if (start >= len) {
                dev_err(ir->dev, "receive overflow invalid: %u", overflow);
        } else {
-               if (overflow > 0)
+               if (overflow > 0) {
                        dev_warn(ir->dev, "receive overflow, at least %u lost",
                                                                overflow);
+                       ir_raw_event_reset(ir->rc);
+               }
 
                do {
                        rawir.duration = ir->buf_in[i] * 85333;