bcm43xx_power.c: uninitialized variable used

From: Adrian Bunk
Date: Tue Apr 04 2006 - 14:44:43 EST


The Coverity checker found this case where the variable "tmp" is used
uninitialized:

<-- snip -->

...
static int bcm43xx_pctl_clockfreqlimit(struct bcm43xx_private *bcm,
int get_max)
{
int limit = 0;
int divisor;
int selection;
int err;
u32 tmp;
struct bcm43xx_coreinfo *old_core;

if (!(bcm->chipcommon_capabilities & BCM43xx_CAPABILITIES_PCTL))
goto out;
old_core = bcm->current_core;
err = bcm43xx_switch_core(bcm, &bcm->core_chipcommon);
if (err)
goto out;

if (bcm->current_core->rev < 6) {
...
} else if (bcm->current_core->rev < 10) {
selection = (tmp & 0x07);
...

<-- snip -->

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/