media: staging: tegra-vde: Do not handle spurious interrupts
authorDmitry Osipenko <digetx@gmail.com>
Sat, 17 Mar 2018 15:28:14 +0000 (11:28 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 4 May 2018 10:33:25 +0000 (06:33 -0400)
Do not handle interrupts if we haven't asked for them, potentially that
could happen if HW wasn't programmed properly.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/tegra-vde/tegra-vde.c

index 94b4db5..9e542c6 100644 (file)
@@ -935,6 +935,9 @@ static irqreturn_t tegra_vde_isr(int irq, void *data)
 {
        struct tegra_vde *vde = data;
 
+       if (completion_done(&vde->decode_completion))
+               return IRQ_NONE;
+
        tegra_vde_set_bits(vde, 0, vde->frameid + 0x208);
        complete(&vde->decode_completion);