diff options
author | David Howells <dhowells@redhat.com> | 2015-03-20 16:37:38 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-03 04:24:00 +0300 |
commit | 67e6590aa9384f87492e20f78a5943718baa695b (patch) | |
tree | 21b81a5937d8819aa93f5357a50a90d607fb34b2 /drivers/media/tuners | |
parent | 0fd68f2f7aee2343f2396188362ba41447d8004f (diff) | |
download | linux-67e6590aa9384f87492e20f78a5943718baa695b.tar.xz |
[media] m88ts2022: Nested loops shouldn't use the same index variable
There are a pair of nested loops inside m88ts2022_cmd() that use the same
index variable, but for different things. Split the variable.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r-- | drivers/media/tuners/m88ts2022.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/tuners/m88ts2022.c b/drivers/media/tuners/m88ts2022.c index 066e5431da93..cdf9fe5376c6 100644 --- a/drivers/media/tuners/m88ts2022.c +++ b/drivers/media/tuners/m88ts2022.c @@ -21,7 +21,7 @@ static int m88ts2022_cmd(struct m88ts2022_dev *dev, int op, int sleep, u8 reg, u8 mask, u8 val, u8 *reg_val) { - int ret, i; + int ret, i, j; unsigned int utmp; struct m88ts2022_reg_val reg_vals[] = { {0x51, 0x1f - op}, @@ -35,9 +35,9 @@ static int m88ts2022_cmd(struct m88ts2022_dev *dev, int op, int sleep, u8 reg, "i=%d op=%02x reg=%02x mask=%02x val=%02x\n", i, op, reg, mask, val); - for (i = 0; i < ARRAY_SIZE(reg_vals); i++) { - ret = regmap_write(dev->regmap, reg_vals[i].reg, - reg_vals[i].val); + for (j = 0; j < ARRAY_SIZE(reg_vals); j++) { + ret = regmap_write(dev->regmap, reg_vals[j].reg, + reg_vals[j].val); if (ret) goto err; } |