From: Hans Verkuil Date: Thu, 12 Mar 2015 07:27:43 +0000 (-0300) Subject: [media] rtl2832: fix compiler warning X-Git-Tag: v4.1-rc1~59^2~1^2~205 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f2e37b9b733c720de917aa7616cce3a1c52225eb;p=karo-tx-linux.git [media] rtl2832: fix compiler warning >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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c index 5d2d8f45b4b6..ad36d1cec1f3 100644 --- a/drivers/media/dvb-frontends/rtl2832.c +++ b/drivers/media/dvb-frontends/rtl2832.c @@ -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");