aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/common
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@bisect.de>2012-01-30 18:00:06 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-02-13 21:54:11 -0200
commit32d7e63c1f4f86ad18404e3f36be99c9910fae9b (patch)
treeb50f65285bf7f1cbca2a0aef2d53ab8c3b9ba876 /drivers/media/common
parent9fa728ea35501fb5cd56880839ad867265c61822 (diff)
[media] max2165: trival fix for some -Wuninitialized warning
Fix for some -Wuninitialized compiler warnings. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/max2165.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/max2165.c b/drivers/media/common/tuners/max2165.c
index cb2c98fbad1..ba84936aafd 100644
--- a/drivers/media/common/tuners/max2165.c
+++ b/drivers/media/common/tuners/max2165.c
@@ -168,7 +168,7 @@ int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction)
int i;
if (0 == divisor)
- return -1;
+ return -EINVAL;
q = dividend / divisor;
remainder = dividend - q * divisor;
@@ -194,10 +194,13 @@ static int max2165_set_rf(struct max2165_priv *priv, u32 freq)
u8 tf_ntch;
u32 t;
u32 quotient, fraction;
+ int ret;
/* Set PLL divider according to RF frequency */
- fixpt_div32(freq / 1000, priv->config->osc_clk * 1000,
- &quotient, &fraction);
+ ret = fixpt_div32(freq / 1000, priv->config->osc_clk * 1000,
+ &quotient, &fraction);
+ if (ret != 0)
+ return ret;
/* 20-bit fraction */
fraction >>= 12;