diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-11-01 17:05:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-11 13:04:53 -0500 |
commit | 00b4bac78f6f607c5882bfdc03008b7acf802349 (patch) | |
tree | 09e59f7b03ba59be6c38b9eae77739bbaa5fa674 /drivers/media/dvb-frontends/drx39xyj/drxj.c | |
parent | ab0625f021f83ecb19c969188ba2af3d154c054e (diff) |
media: imx274: don't randomly return if range_count is zero
As smatch reported:
drivers/media/i2c/imx274.c:659 imx274_regmap_util_write_table_8() error: uninitialized symbol 'err'.
There is a bug at imx274_regmap_util_write_table_8() with causes
it to randomly return a random error if range_count is zero.
Worse than that, the logic there starts with range_count
equal to zero, and periodically resets it to zero again.
As it is a way more likely that err assumes a non-zero value,
I suspect that the chance of this code to run is very small,
so, it would be worth to review the entire function.
Anyway, clearly it shouldn't be returning error if range_count
is zero. So, let's fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends/drx39xyj/drxj.c')
0 files changed, 0 insertions, 0 deletions