Commit bc3cad2b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: qt1010: fix bogus warnings

The logic at qt1010_init_meas1() and qt1010_init_meas2()
are too complex for static analizers to identify that
some vars are always be initialized.

That causes smatch to produce the following warnings:
	drivers/media/tuners/qt1010.c:248 qt1010_init_meas1() error: uninitialized symbol 'val2'.
	drivers/media/tuners/qt1010.c:282 qt1010_init_meas2() error: uninitialized symbol 'val'.

So, add annotations to prevent those bogus warnings.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 01a26ff9
...@@ -224,7 +224,7 @@ static int qt1010_set_params(struct dvb_frontend *fe) ...@@ -224,7 +224,7 @@ static int qt1010_set_params(struct dvb_frontend *fe)
static int qt1010_init_meas1(struct qt1010_priv *priv, static int qt1010_init_meas1(struct qt1010_priv *priv,
u8 oper, u8 reg, u8 reg_init_val, u8 *retval) u8 oper, u8 reg, u8 reg_init_val, u8 *retval)
{ {
u8 i, val1, val2; u8 i, val1, uninitialized_var(val2);
int err; int err;
qt1010_i2c_oper_t i2c_data[] = { qt1010_i2c_oper_t i2c_data[] = {
...@@ -259,7 +259,7 @@ static int qt1010_init_meas1(struct qt1010_priv *priv, ...@@ -259,7 +259,7 @@ static int qt1010_init_meas1(struct qt1010_priv *priv,
static int qt1010_init_meas2(struct qt1010_priv *priv, static int qt1010_init_meas2(struct qt1010_priv *priv,
u8 reg_init_val, u8 *retval) u8 reg_init_val, u8 *retval)
{ {
u8 i, val; u8 i, uninitialized_var(val);
int err; int err;
qt1010_i2c_oper_t i2c_data[] = { qt1010_i2c_oper_t i2c_data[] = {
{ QT1010_WR, 0x07, reg_init_val }, { QT1010_WR, 0x07, reg_init_val },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment