]> git.baikalelectronics.ru Git - kernel.git/commit
media: mantis: prevent staying forever in a loop at IRQ
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 12 Apr 2018 12:28:33 +0000 (08:28 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 17 Apr 2018 09:50:05 +0000 (05:50 -0400)
commit087749789508d3b867e1e9b78c55b126fb2091be
treee5658832786cc7024d32d7c22f616a5e3a9caecd
parent6d87aa280a28ad729c32c25662bddac1a18ff19a
media: mantis: prevent staying forever in a loop at IRQ

As warned by smatch:
drivers/media/pci/mantis/mantis_uart.c:105 mantis_uart_work() 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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/mantis/mantis_uart.c