Kangjie Lu 0ab34a0881 media: si2165: fix a missing check of return value
si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find
that "val_tmp" will be an uninitialized value when regmap_read() fails.
"val_tmp" is then assigned to "val". So if si2165_readreg8() fails,
"val" will be a random value. Further use will lead to undefined
behaviors. The fix checks if si2165_readreg8() fails, and if so, returns
its error code upstream.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Reviewed-by: Matthias Schwarzott <zzam@gentoo.org>
Tested-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-19 16:47:20 -04:00
..
2018-03-21 14:11:54 -04:00
2019-03-01 09:26:20 -05:00
2016-11-13 10:02:22 -08:00
2016-03-03 09:26:05 -03:00
2015-04-08 15:02:07 -03:00
2017-12-12 05:33:18 -05:00
2018-09-11 13:32:17 -04:00