]> git.baikalelectronics.ru Git - kernel.git/commit
media: st_rc: Don't stay on an IRQ handler forever
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 12 Apr 2018 10:32:18 +0000 (06:32 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 17 Apr 2018 09:50:05 +0000 (05:50 -0400)
commit6d87aa280a28ad729c32c25662bddac1a18ff19a
tree1fb02a176ae653ffccd798831558174a44336d90
parentf01c997d9d79005d8fe1c2ee32892f8361bddb86
media: st_rc: Don't stay on an IRQ handler forever

As warned by smatch:
drivers/media/rc/st_rc.c:110 st_rc_rx_interrupt() warn: this loop depends on readl() succeeding

If something goes wrong at readl(), the logic will stay there
inside an IRQ code forever. This is not the nicest thing to
do :-)

So, add a timeout there, preventing staying inside the IRQ
for more than 10ms.

Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/rc/st_rc.c