summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2013-04-20 06:02:16 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 10:30:54 -0300
commit619ab8f611e269e12c956361a38a4206cef9155d (patch)
tree4a00f6ad33ff99daa2aea0889a4e600ace96b1e5 /drivers/media
parentef0c87001c50ade70183b5cccbf573ef28320965 (diff)
[media] r820t: quiet gcc warning on n_ring
drivers/media/tuners/r820t.c: In function 'r820t_imr': drivers/media/tuners/r820t.c:1871:8: warning: 'n_ring' may be used uninitialized in this function [-Wmaybe-uninitialized] Mauro: This is a FALSE POSITIVE: the loop will always return a value for n_ring, as the last test will fill it with 15, if the loop fails. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/tuners/r820t.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c
index 36ddbf1e08b3..e6e7a06d2b40 100644
--- a/drivers/media/tuners/r820t.c
+++ b/drivers/media/tuners/r820t.c
@@ -1854,15 +1854,12 @@ static int r820t_imr(struct r820t_priv *priv, unsigned imr_mem, bool im_flag)
else
ring_ref = priv->cfg->xtal;
+ n_ring = 15;
for (n = 0; n < 16; n++) {
if ((16 + n) * 8 * ring_ref >= 3100000) {
n_ring = n;
break;
}
-
- /* n_ring not found */
- if (n == 15)
- n_ring = n;
}
reg18 = r820t_read_cache_reg(priv, 0x18);