aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media/usb/dvb-usb
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-02-10 18:51:33 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-21 12:55:07 +0200
commit96f3a9392799dd0f6472648a7366622ffd0989f3 (patch)
treecf6a40655bf6b86b23b15cfe073da564b71405ae /drivers/media/usb/dvb-usb
parentmedia: rc: if kernel is built without an IR codec, don't advertise it (diff)
downloadwireguard-linux-96f3a9392799dd0f6472648a7366622ffd0989f3.tar.xz
wireguard-linux-96f3a9392799dd0f6472648a7366622ffd0989f3.zip
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: fbfee8684ff2 ("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>
Diffstat (limited to 'drivers/media/usb/dvb-usb')
-rw-r--r--drivers/media/usb/dvb-usb/dibusb-mb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb/dibusb-mb.c b/drivers/media/usb/dvb-usb/dibusb-mb.c
index f462c918d5a4..e9dc27f73970 100644
--- a/drivers/media/usb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/usb/dvb-usb/dibusb-mb.c
@@ -81,7 +81,7 @@ static int dibusb_tuner_probe_and_attach(struct dvb_usb_adapter *adap)
if (i2c_transfer(&adap->dev->i2c_adap, msg, 2) != 2) {
err("tuner i2c write failed.");
- ret = -EREMOTEIO;
+ return -EREMOTEIO;
}
if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl)