Skip to content
Commit 39ad07b7 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: s5c73m3-core: fix logic on a timeout condition



As warned by smatch:
	drivers/media/i2c/s5c73m3/s5c73m3-core.c:268 s5c73m3_check_status() error: uninitialized symbol 'status'.

if s5c73m3_check_status() is called too late, time_is_after_jiffies(end)
will return 0, causing the while to abort before reading status.

The current code will do the wrong thing here, as it will still
check if status != value. The right fix here is to change
the logic to ensure that it will always read the status.

Suggested-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 8239bac1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment