* dvb_frontend_swzigzag(): uninitialized variable usage
@ 2006-11-06 18:27 Adrian Bunk
2006-11-17 1:13 ` [v4l-dvb-maintainer] " Andrew de Quincey
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2006-11-06 18:27 UTC (permalink / raw)
To: v4l-dvb-maintainer; +Cc: linux-kernel
The Coverity checker spotted the following in
drivers/media/dvb/dvb-core/dvb_frontend.c:
<-- snip -->
...
static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
{
fe_status_t s;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
/* if we've got no parameters, just keep idling */
if (fepriv->state & FESTATE_IDLE) {
fepriv->delay = 3*HZ;
fepriv->quality = 0;
return;
}
/* in SCAN mode, we just set the frontend when asked and leave it alone */
if (fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT) {
if (fepriv->state & FESTATE_RETUNE) {
if (fe->ops.set_frontend)
fe->ops.set_frontend(fe, &fepriv->parameters);
fepriv->state = FESTATE_TUNED;
}
fepriv->delay = 3*HZ;
fepriv->quality = 0;
return;
}
/* get the frontend status */
if (fepriv->state & FESTATE_RETUNE) {
s = 0;
} else {
if (fe->ops.read_status)
fe->ops.read_status(fe, &s);
if (s != fepriv->status) {
dvb_frontend_add_event(fe, s);
fepriv->status = s;
}
}
...
<-- snip -->
Note that in the "if (s != fepriv->status)", "s" could be used
uninitialized.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [v4l-dvb-maintainer] dvb_frontend_swzigzag(): uninitialized variable usage
2006-11-06 18:27 dvb_frontend_swzigzag(): uninitialized variable usage Adrian Bunk
@ 2006-11-17 1:13 ` Andrew de Quincey
0 siblings, 0 replies; 2+ messages in thread
From: Andrew de Quincey @ 2006-11-17 1:13 UTC (permalink / raw)
To: v4l-dvb-maintainer; +Cc: Adrian Bunk, linux-kernel
On Monday 06 November 2006 18:27, Adrian Bunk wrote:
> The Coverity checker spotted the following in
> drivers/media/dvb/dvb-core/dvb_frontend.c:
>
> <-- snip -->
>
> ...
> static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
> {
> fe_status_t s;
[snip]
thanks, fix should be in HG soon.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-17 1:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-06 18:27 dvb_frontend_swzigzag(): uninitialized variable usage Adrian Bunk
2006-11-17 1:13 ` [v4l-dvb-maintainer] " Andrew de Quincey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).