linux/drivers/media/pci/ddbridge
Daniel Scheller d52786ddd2 media: ddbridge: make (ddb)readl in while-loops fail-safe
Reported by smatch:

  drivers/media/pci/ddbridge/ddbridge-core.c:1246 input_tasklet() warn: this loop depends on readl() succeeding
  drivers/media/pci/ddbridge/ddbridge-core.c:1768 flashio() warn: this loop depends on readl() succeeding
  drivers/media/pci/ddbridge/ddbridge-core.c:1788 flashio() warn: this loop depends on readl() succeeding

Fix this by introducing safe_ddbreadl() which will wrap ddbreadl and checks
for all bits set in the return which indicates failure, and return 0 in
that case. Usable as drop-in-replacement in all affected while loops w/o
having to change the logic.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-24 09:41:30 -03:00
..
ddbridge-core.c media: ddbridge: make (ddb)readl in while-loops fail-safe 2017-06-24 09:41:30 -03:00
ddbridge-regs.h [media] ddbridge: board control setup, ts quirk flags 2017-06-20 09:57:30 -03:00
ddbridge.h [media] ddbridge: hardware IDs for new C2T2 cards and other devices 2017-06-20 09:59:48 -03:00
Kconfig [media] ddbridge: hardware IDs for new C2T2 cards and other devices 2017-06-20 09:59:48 -03:00
Makefile