All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtl2832: fix compiler warning
@ 2015-03-12  7:27 Hans Verkuil
  0 siblings, 0 replies; only message in thread
From: Hans Verkuil @ 2015-03-12  7:27 UTC (permalink / raw)
  To: Linux Media Mailing List

>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>

diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c
index 5d2d8f4..ad36d1c 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");
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-12  7:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12  7:27 [PATCH] rtl2832: fix compiler warning Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.