Skip to content

Commit

Permalink
[media] rtl2832: fix compiler warning
Browse files Browse the repository at this point in the history
>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 <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
hverkuil authored and mchehab committed Apr 2, 2015
1 parent fae119b commit f2e37b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb-frontends/rtl2832.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit f2e37b9

Please sign in to comment.