2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00
linux-next/drivers/media
Colin Ian King 7a2148dfda media: smiapp: fix timeout checking in smiapp_read_nvm
The current code decrements the timeout counter i and the end of
each loop i is incremented, so the check for timeout will always
be false and hence the timeout mechanism is just a dead code path.
Potentially, if the RD_READY bit is not set, we could end up in
an infinite loop.

Fix this so the timeout starts from 1000 and decrements to zero,
if at the end of the loop i is zero we have a timeout condition.

Detected by CoverityScan, CID#1324008 ("Logically dead code")

Fixes: ccfc97bdb5 ("[media] smiapp: Add driver")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-17 06:22:08 -04:00
..
cec media: rc: per-protocol repeat period and minimum keyup timer 2018-04-20 09:16:55 -04:00
common media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
dvb-core media: dvb_ca_en50221: prevent using slot_info for Spectre attacs 2018-05-16 10:17:22 -04:00
dvb-frontends media: lgdt330x.h: fix compiler warning 2018-05-11 11:40:09 -04:00
firewire vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
i2c media: smiapp: fix timeout checking in smiapp_read_nvm 2018-05-17 06:22:08 -04:00
mmc media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
pci media: cx23885: Add some missing register documentation 2018-05-11 11:29:53 -04:00
platform media: v4l: vsp1: Integrate DISCOM in display pipeline 2018-05-17 06:22:08 -04:00
radio Linux 4.17-rc4 2018-05-10 07:19:23 -04:00
rc media: rc: ite-cir: lower timeout and extend allowed timeout range 2018-05-14 07:17:28 -04:00
spi media: cxd2880-spi: Modified how to declare structure 2018-05-05 10:37:12 -04:00
tuners Linux 4.17-rc4 2018-05-10 07:19:23 -04:00
usb media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
v4l2-core media: v4l2-ioctl: replace IOCTL_INFO_STD with stub functions 2018-05-11 11:26:38 -04:00
Kconfig media: cec: Kconfig coding style issue 2018-05-09 16:26:50 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
media-device.c media: media-device: fix ioctl function types 2018-05-09 16:33:46 -04:00
media-devnode.c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
media-entity.c media: media.h: reorganize header to make it easier to understand 2018-02-26 10:14:46 -05:00