diff options
Diffstat (limited to 'drivers/media/common/tuners/max2165.c')
-rw-r--r-- | drivers/media/common/tuners/max2165.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/max2165.c b/drivers/media/common/tuners/max2165.c index cb2c98fbad1b..ba84936aafd6 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) | |||
168 | int i; | 168 | int i; |
169 | 169 | ||
170 | if (0 == divisor) | 170 | if (0 == divisor) |
171 | return -1; | 171 | return -EINVAL; |
172 | 172 | ||
173 | q = dividend / divisor; | 173 | q = dividend / divisor; |
174 | remainder = dividend - q * divisor; | 174 | remainder = dividend - q * divisor; |
@@ -194,10 +194,13 @@ static int max2165_set_rf(struct max2165_priv *priv, u32 freq) | |||
194 | u8 tf_ntch; | 194 | u8 tf_ntch; |
195 | u32 t; | 195 | u32 t; |
196 | u32 quotient, fraction; | 196 | u32 quotient, fraction; |
197 | int ret; | ||
197 | 198 | ||
198 | /* Set PLL divider according to RF frequency */ | 199 | /* Set PLL divider according to RF frequency */ |
199 | fixpt_div32(freq / 1000, priv->config->osc_clk * 1000, | 200 | ret = fixpt_div32(freq / 1000, priv->config->osc_clk * 1000, |
200 | "ient, &fraction); | 201 | "ient, &fraction); |
202 | if (ret != 0) | ||
203 | return ret; | ||
201 | 204 | ||
202 | /* 20-bit fraction */ | 205 | /* 20-bit fraction */ |
203 | fraction >>= 12; | 206 | fraction >>= 12; |