summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-04-25 11:04:21 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-17 06:22:08 -0400
commit7a2148dfda8001c983f0effd9afd8a7fa58e99c4 (patch)
tree06b81a6d685bdab447c78dd27ae73daf127c331b /tools
parentd30bb512da3d8e44db086494b4db4d62bbaba677 (diff)
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: ccfc97bdb5ae ("[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>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions