linux/drivers/media/i2c
Mauro Carvalho Chehab 00b4bac78f 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>
2017-12-11 13:04:53 -05:00
..
adv748x media: i2c: adv748x: Restore full DT paths in kernel messages 2017-12-08 11:27:46 -05:00
cx25840 media: cx25840: fix a possible divide by zero in set_fmt callback 2017-12-11 13:04:33 -05:00
et8ek8 media: et8ek8: select V4L2_FWNODE 2017-11-30 04:42:19 -05:00
m5mols media: m5mols: fix some kernel-doc markups 2017-11-30 04:18:55 -05:00
s5c73m3 media: Convert to using %pOF instead of full_name 2017-08-20 08:20:20 -04:00
smiapp media: smiapp: Add support for flash and lens devices 2017-10-31 14:05:01 -04:00
soc_camera media updates for v4.15-rc1 2017-11-15 20:30:12 -08:00
ad5820.c [media] ad5820: unregister async sub-device 2017-06-08 12:34:17 -03:00
ad9389b.c media: ad9389b: constify i2c_device_id 2017-08-26 08:42:12 -04:00
adp1653.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
adv7170.c [media] adv7170: drop redundant ret local 2017-01-30 15:47:05 -02:00
adv7175.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
adv7180.c media: adv7180: Remove duplicate checks 2017-12-08 10:12:45 -05:00
adv7183_regs.h scripts/spelling.txt: add "swithc" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
adv7183.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
adv7343_regs.h
adv7343.c [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
adv7393_regs.h
adv7393.c [media] media/i2c: Delete owner assignment 2016-09-06 16:21:24 -03:00
adv7511.c media: adv7511: constify i2c_device_id 2017-08-26 08:42:28 -04:00
adv7604.c media: adv7604.c: add missing return 2017-12-08 10:39:17 -05:00
adv7842.c media: drivers: improve a size determination 2017-09-23 08:20:57 -04:00
ak881x.c [media] drivers: media: i2c: ak881x: constify v4l2_subdev_* structures 2017-02-03 09:33:55 -02:00
aptina-pll.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
aptina-pll.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
as3645a.c [media] as3645a: Join string literals back 2017-06-20 08:18:12 -03:00
bt819.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
bt856.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
bt866.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
cs53l32a.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
cs3308.c [media] media/i2c: Delete owner assignment 2016-09-06 16:21:24 -03:00
cs5345.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dw9714.c [media] dw9714: Set the v4l2 focus ctrl step as 1 2017-10-04 17:08:47 -03:00
imx274.c media: imx274: don't randomly return if range_count is zero 2017-12-11 13:04:53 -05:00
ir-kbd-i2c.c [media] media: rc: ensure that protocols are enabled for scancode drivers 2017-10-04 15:22:26 -03:00
Kconfig media: ov13858: Select V4L2_FWNODE 2017-11-30 04:41:58 -05:00
ks0127.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ks0127.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
lm3560.c media: lm3560: add a missing kernel-doc parameter 2017-11-30 04:19:03 -05:00
lm3646.c [media] media framework: rename pads init function to media_entity_pads_init() 2016-01-11 12:19:03 -02:00
m52790.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
Makefile media updates for v4.15-rc1 2017-11-15 20:30:12 -08:00
max2175.c media: max2175: don't clear V4L2_SUBDEV_FL_IS_I2C 2017-10-31 12:08:13 -04:00
max2175.h [media] media: i2c: max2175: Add MAX2175 support 2017-06-20 07:02:43 -03:00
ml86v7667.c [media] drivers: media: i2c: ml86v7667: constify v4l2_subdev_* structures 2017-02-03 09:34:43 -02:00
msp3400-driver.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
msp3400-driver.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msp3400-kthreads.c [media] media drivers: annotate fall-through 2017-05-19 07:10:03 -03:00
mt9m032.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
mt9m111.c [media] mt9m111: Propagate the real error on v4l2_clk_get() failure 2017-10-04 17:07:18 -03:00
mt9p031.c [media] drivers: media: i2c: constify v4l2_subdev_* structures 2017-02-03 09:23:19 -02:00
mt9t001.c media: v4l: mt9t001: constify video_subdev structures 2017-08-20 08:32:00 -04:00
mt9v011.c media: i2c: add SPDX identifiers to the code I wrote 2017-12-11 07:43:36 -05:00
mt9v032.c media: v4l: mt9v032: Disable clock on error paths 2017-12-08 09:24:01 -05:00
noon010pc30.c [media] drivers: media: i2c: constify v4l2_subdev_* structures 2017-02-03 09:23:19 -02:00
ov2640.c media: ov2640: don't clear V4L2_SUBDEV_FL_IS_I2C 2017-10-31 12:08:34 -04:00
ov2659.c [media] v4l: Switch from V4L2 OF not V4L2 fwnode API 2017-06-06 09:58:16 -03:00
ov5640.c media: ov5640: don't clear V4L2_SUBDEV_FL_IS_I2C 2017-10-31 12:08:50 -04:00
ov5645.c media: ov5645: Add control to export CSI2 link frequency 2017-07-19 15:52:00 -04:00
ov5647.c media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00
ov5670.c media: ov5670: Add support for flash and lens devices 2017-10-31 14:06:45 -04:00
ov6650.c [media] i2c: Delete an error messages for failed memory allocation 2017-10-04 17:15:22 -03:00
ov7640.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
ov7670.c media: ov7670: add V4L2_CID_TEST_PATTERN control 2017-12-08 09:23:12 -05:00
ov9650.c media: ov9650: remove unnecessary terminated entry in menu items array 2017-10-31 12:09:44 -04:00
ov13858.c media: ov13858: Add support for flash and lens devices 2017-10-31 14:07:19 -04:00
s5k4ecgx.c [media] media/i2c: Delete owner assignment 2016-09-06 16:21:24 -03:00
s5k5baf.c media: Convert to using %pOF instead of full_name 2017-08-20 08:20:20 -04:00
s5k6a3.c media: s5k6a3: document some fields at struct s5k6a3 2017-11-30 04:18:57 -05:00
s5k6aa.c media: s5k6aa: describe some function parameters 2017-11-30 04:18:58 -05:00
saa711x_regs.h media: i2c: add SPDX identifiers to the code I wrote 2017-12-11 07:43:36 -05:00
saa717x.c media: media/i2c/saa717x: fix spelling mistake: "implementd" -> "implemented" 2017-07-19 15:00:57 -04:00
saa6588.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
saa6752hs.c [media] i2c: Drop owner assignment from i2c_driver 2015-08-11 13:00:15 -03:00
saa7110.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
saa7115.c media: i2c: add SPDX identifiers to the code I wrote 2017-12-11 07:43:36 -05:00
saa7127.c media: saa7127: constify i2c_device_id 2017-08-26 08:42:57 -04:00
saa7185.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
smiapp-pll.c [media] smiapp-pll: Don't complain aloud about failing PLL calculation 2016-10-21 15:15:06 -02:00
smiapp-pll.h
sony-btf-mpx.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
sr030pc30.c [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
tc358743_regs.h media: tc358743_regs.h: add CEC registers 2017-09-23 07:57:59 -04:00
tc358743.c media: tc358743: Convert timers to use timer_setup() 2017-10-31 06:39:24 -04:00
tda7432.c [media] i2c: Drop owner assignment from i2c_driver 2015-08-11 13:00:15 -03:00
tda9840.c [media] i2c: Drop owner assignment from i2c_driver 2015-08-11 13:00:15 -03:00
tea6415c.c [media] i2c: Drop owner assignment from i2c_driver 2015-08-11 13:00:15 -03:00
tea6415c.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tea6420.c [media] i2c: Drop owner assignment from i2c_driver 2015-08-11 13:00:15 -03:00
tea6420.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ths7303.c [media] media: i2c: ths7303: remove redundant assignment on bt 2016-05-07 11:47:12 -03:00
ths8200_regs.h
ths8200.c media: ths8200: constify i2c_device_id 2017-08-26 08:43:40 -04:00
tlv320aic23b.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tvaudio.c media: tvaudio: Convert timers to use timer_setup() 2017-10-31 06:40:50 -04:00
tvp514x_regs.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tvp514x.c media: tvp514x: fix kernel-doc parameters 2017-11-30 04:18:59 -05:00
tvp5150_reg.h media: i2c: add SPDX identifiers to the code I wrote 2017-12-11 07:43:36 -05:00
tvp5150.c media: i2c: add SPDX identifiers to the code I wrote 2017-12-11 07:43:36 -05:00
tvp7002_reg.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tvp7002.c [media] v4l: Switch from V4L2 OF not V4L2 fwnode API 2017-06-06 09:58:16 -03:00
tw2804.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tw9903.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tw9906.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
uda1342.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
upd64031a.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
upd64083.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
vp27smpx.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
vpx3220.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
vs6624_regs.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
vs6624.c media: vs6624: constify vs6624_default_fmt 2017-08-09 11:19:20 -04:00
wm8739.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
wm8775.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00