diff mbox

[2/3] fc2580: silence uninitialized variable warning

Message ID 1348486638-31169-3-git-send-email-gennarone@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gianluca Gennari Sept. 24, 2012, 11:37 a.m. UTC
fc2580.c: In function 'fc2580_set_params':
fc2580.c:118: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
 drivers/media/tuners/fc2580.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Antti Palosaari Sept. 24, 2012, 11:55 a.m. UTC | #1
On 09/24/2012 02:37 PM, Gianluca Gennari wrote:
> fc2580.c: In function 'fc2580_set_params':
> fc2580.c:118: warning: 'ret' may be used uninitialized in this function
>
> Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
> ---
>   drivers/media/tuners/fc2580.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
> index 036e94b..3ad68e9 100644
> --- a/drivers/media/tuners/fc2580.c
> +++ b/drivers/media/tuners/fc2580.c
> @@ -115,7 +115,7 @@ static int fc2580_set_params(struct dvb_frontend *fe)
>   {
>   	struct fc2580_priv *priv = fe->tuner_priv;
>   	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> -	int ret, i;
> +	int ret=0, i;

Nack. This is Codingstyle violation. See rules around line 206 from 
Documentation/CodingStyle

That replace warning with Codingstyle mistake. Change it to meet 
CodingStyle and resend.


>   	unsigned int r_val, n_val, k_val, k_val_reg, f_ref;
>   	u8 tmp_val, r18_val;
>   	u64 f_vco;
>

Antti
diff mbox

Patch

diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index 036e94b..3ad68e9 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -115,7 +115,7 @@  static int fc2580_set_params(struct dvb_frontend *fe)
 {
 	struct fc2580_priv *priv = fe->tuner_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
-	int ret, i;
+	int ret=0, i;
 	unsigned int r_val, n_val, k_val, k_val_reg, f_ref;
 	u8 tmp_val, r18_val;
 	u64 f_vco;