]> git.baikalelectronics.ru Git - kernel.git/commit
media: dvb: return -EREMOTEIO on i2c transfer failure.
authorColin Ian King <colin.king@canonical.com>
Mon, 10 Feb 2020 17:51:33 +0000 (18:51 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 21 Apr 2020 10:55:07 +0000 (12:55 +0200)
commitcfc03775d794664fde5c112e79f296982a293bbf
treecf6a40655bf6b86b23b15cfe073da564b71405ae
parent1330286c944ba58cfd91fe569077ed37ee37f4a1
media: dvb: return -EREMOTEIO on i2c transfer failure.

Currently when i2c transfers fail the error return -EREMOTEIO
is assigned to err but then later overwritten when the tuner
attach call is made.  Fix this by returning early with the
error return code -EREMOTEIO on i2c transfer failure errors.

If the transfer fails, an uninitialized value will be read from b2.

Addresses-Coverity: ("Unused value")

Fixes: f2ebb1453070 ("V4L/DVB (5651): Dibusb-mb: convert pll handling to properly use dvb-pll")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/dvb-usb/dibusb-mb.c