summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-02-10 17:58:44 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-03-12 11:47:33 +0300
commiteceeea5481d4eeb6073e8ccb2f229bb0dd14a44d (patch)
tree3eef8c8115fa5008b8911eb85e3937e04121ae69 /drivers/media
parenta7463e2dc698075132de9905b89f495df888bb79 (diff)
downloadlinux-eceeea5481d4eeb6073e8ccb2f229bb0dd14a44d.tar.xz
media: lmedm04: remove redundant assignment to variable gate
The variable gate is being initialized and also checked and re-assigned with values that are never read as it is being re-assigned later in a for-loop with a new value. The assignments are redundant and can be removed. Addresses Coverity ("Unused value") 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')
-rw-r--r--drivers/media/usb/dvb-usb-v2/lmedm04.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 62d3566bf7ee..fd8b42bb9a84 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -486,13 +486,10 @@ static int lme2510_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
static u8 obuf[64], ibuf[64];
int i, read, read_o;
u16 len;
- u8 gate = st->i2c_gate;
+ u8 gate;
mutex_lock(&d->i2c_mutex);
- if (gate == 0)
- gate = 5;
-
for (i = 0; i < num; i++) {
read_o = msg[i].flags & I2C_M_RD;
read = i + 1 < num && msg[i + 1].flags & I2C_M_RD;