diff mbox

[56/68,media] tua9001: fix a warning

Message ID 1351370486-29040-57-git-send-email-mchehab@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Oct. 27, 2012, 8:41 p.m. UTC
drivers/media/tuners/tua9001.c:211:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/tuners/tua9001.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Antti Palosaari Nov. 5, 2012, 9:10 p.m. UTC | #1
On 10/27/2012 11:41 PM, Mauro Carvalho Chehab wrote:
> drivers/media/tuners/tua9001.c:211:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Cc: Antti Palosaari <crope@iki.fi>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> ---
>   drivers/media/tuners/tua9001.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/tuners/tua9001.c b/drivers/media/tuners/tua9001.c
> index 3896684..83a6240 100644
> --- a/drivers/media/tuners/tua9001.c
> +++ b/drivers/media/tuners/tua9001.c
> @@ -136,7 +136,7 @@ static int tua9001_set_params(struct dvb_frontend *fe)
>   {
>   	struct tua9001_priv *priv = fe->tuner_priv;
>   	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
> -	int ret, i;
> +	int ret = 0, i;
>   	u16 val;
>   	u32 frequency;
>   	struct reg_val data[2];
>

I cannot see any condition ret could be used as uninitialized. I looked 
myself that warning earlier too.

Anyway, I am fine with it.

Acked-by: Antti Palosaari <crope@iki.fi>

Antti
diff mbox

Patch

diff --git a/drivers/media/tuners/tua9001.c b/drivers/media/tuners/tua9001.c
index 3896684..83a6240 100644
--- a/drivers/media/tuners/tua9001.c
+++ b/drivers/media/tuners/tua9001.c
@@ -136,7 +136,7 @@  static int tua9001_set_params(struct dvb_frontend *fe)
 {
 	struct tua9001_priv *priv = fe->tuner_priv;
 	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
-	int ret, i;
+	int ret = 0, i;
 	u16 val;
 	u32 frequency;
 	struct reg_val data[2];