[media] rtl2832: fix compiler warning
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 12 Mar 2015 07:27:43 +0000 (04:27 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 2 Apr 2015 21:22:54 +0000 (18:22 -0300)
>From the daily build:

rtl2832.c: In function 'rtl2832_read_status':
rtl2832.c:703:12: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized]
  } else if (tmp == 10) {
            ^

The code is OK, it's just the compiler that cannot figure out what's
going on. So just init 'tmp' to 0.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/dvb-frontends/rtl2832.c

index 5d2d8f45b4b62a1005e261383b7c858d3c5e539e..ad36d1cec1f39eb132a845ae881e81d8f40db146 100644 (file)
@@ -685,7 +685,7 @@ static int rtl2832_read_status(struct dvb_frontend *fe, fe_status_t *status)
        struct rtl2832_dev *dev = fe->demodulator_priv;
        struct i2c_client *client = dev->client;
        int ret;
-       u32 tmp;
+       u32 tmp = 0;
 
        dev_dbg(&client->dev, "\n");