提交 bf512b2d 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[media] stv0367: signedness bug in stv0367_get_tuner_freq()

We use err to store negative error codes so it should be signed.  And
if we return an error from stv0367_get_tuner_freq() that needs to be
handled properly as well.  (param->frequency is a u32).
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 c6384c88
...@@ -913,7 +913,7 @@ static u32 stv0367_get_tuner_freq(struct dvb_frontend *fe) ...@@ -913,7 +913,7 @@ static u32 stv0367_get_tuner_freq(struct dvb_frontend *fe)
struct dvb_frontend_ops *frontend_ops = NULL; struct dvb_frontend_ops *frontend_ops = NULL;
struct dvb_tuner_ops *tuner_ops = NULL; struct dvb_tuner_ops *tuner_ops = NULL;
u32 freq = 0; u32 freq = 0;
u32 err = 0; int err = 0;
dprintk("%s:\n", __func__); dprintk("%s:\n", __func__);
...@@ -1940,7 +1940,7 @@ static int stv0367ter_get_frontend(struct dvb_frontend *fe, ...@@ -1940,7 +1940,7 @@ static int stv0367ter_get_frontend(struct dvb_frontend *fe,
int constell = 0,/* snr = 0,*/ Data = 0; int constell = 0,/* snr = 0,*/ Data = 0;
param->frequency = stv0367_get_tuner_freq(fe); param->frequency = stv0367_get_tuner_freq(fe);
if (param->frequency < 0) if ((int)param->frequency < 0)
param->frequency = c->frequency; param->frequency = c->frequency;
constell = stv0367_readbits(state, F367TER_TPS_CONST); constell = stv0367_readbits(state, F367TER_TPS_CONST);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册