summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-04-19 09:06:02 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-05-26 11:52:50 +0200
commita05e9aabd9dc27fc8888678391e3bf78624f8253 (patch)
treee2adea35fe7585f14dedf9a330f88e92463cd7fa /drivers/media
parentmedia: cec: core: don't set last_initiator if tx in progress (diff)
downloadlinux-a05e9aabd9dc27fc8888678391e3bf78624f8253.tar.xz
linux-a05e9aabd9dc27fc8888678391e3bf78624f8253.zip
media: staging: media: atomisp: init high & low vars
Fix a compiler warning: include/linux/dev_printk.h: In function 'ov2680_probe': include/linux/dev_printk.h:144:31: warning: 'high' may be used uninitialized [-Wmaybe-uninitialized] 144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~ In function 'ov2680_detect', inlined from 'ov2680_s_config' at drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:468:8, inlined from 'ov2680_probe' at drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:647:8: drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:376:13: note: 'high' was declared here 376 | u32 high, low; | ^~~~ 'high' is indeed uninitialized after the ov_read_reg8() call failed, so there is no point showing the value. Just say that the read failed. But low can also be used uninitialized later, so just make it more robust and properly zero the high and low variables. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions