]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/media/tuners/xc5000.c
media: xc5000: better handle I2C error messages
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 1 Nov 2017 21:05:43 +0000 (17:05 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 11 Dec 2017 18:15:35 +0000 (13:15 -0500)
commit7621b8c4c06bd6414c438f9e50781af1cd88d063
treead72c4f6e4bbadc975cbf539fe50dfa533bf1b7d
parentad7b57d58d16666f607914bf9ff6950e1c5532a4
media: xc5000: better handle I2C error messages

As warned by smatch, there are several places where the I2C
transfer may fail, leading into inconsistent behavior:

drivers/media/tuners/xc5000.c:689 xc_debug_dump() error: uninitialized symbol 'regval'.
drivers/media/tuners/xc5000.c:841 xc5000_is_firmware_loaded() error: uninitialized symbol 'id'.
drivers/media/tuners/xc5000.c:939 xc5000_set_tv_freq() error: uninitialized symbol 'pll_lock_status'.
drivers/media/tuners/xc5000.c:1195 xc_load_fw_and_init_tuner() error: uninitialized symbol 'pll_lock_status'.

Handle the return codes from the I2C transfer, in order to
address those issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/tuners/xc5000.c