Skip to contentSkip to conversation

fc2580: silence uninitialized variable warning

PATCH In review Gianluca Gennari 2 participants 2 messages Sep 24, 2012 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): GmailId139f821bcaa99b1e

#1 lore raw

PATCH v2 2/3 fc2580: silence uninitialized variable warning

fc2580.c: In function 'fc2580_set_params':
fc2580.c:118: warning: 'ret' may be used uninitialized in this function

V2: fixed coding style.

---
 drivers/media/tuners/fc2580.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/tuners/fc2580.c +1 -1
index 036e94b..3ad68e9 100644
@@ -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;
Signature · 1 line
1.7.0.4
Acked-by Reviewed-by on v2 2/3
#2 lore raw
Quoted 6 lines · Gianluca Gennari

fc2580.c: In function 'fc2580_set_params':
fc2580.c:118: warning: 'ret' may be used uninitialized in this function

V2: fixed coding style.

Quoted 18 lines
---
  drivers/media/tuners/fc2580.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/tuners/fc2580.c +1 -1
index 036e94b..3ad68e9 100644
@@ -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;
Signature · 1 line
http://palosaari.fi/