* [patch] Staging: iio/dac/ad5504: uninitialized variable in error
@ 2011-08-09 18:06 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-08-09 18:06 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Greg Kroah-Hartman, Michael Hennerich,
open list:STAGING - INDUSTR..., open list:STAGING SUBSYSTEM,
kernel-janitors
If we hit the "goto error_disable_reg" then the "st" variable is
uninitialized.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/iio/dac/ad5504.c b/drivers/staging/iio/dac/ad5504.c
index 1915f45..88512dd 100644
--- a/drivers/staging/iio/dac/ad5504.c
+++ b/drivers/staging/iio/dac/ad5504.c
@@ -338,7 +338,7 @@ error_free_dev:
iio_free_device(indio_dev);
error_disable_reg:
if (!IS_ERR(reg))
- regulator_disable(st->reg);
+ regulator_disable(reg);
error_put_reg:
if (!IS_ERR(reg))
regulator_put(reg);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-09 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-09 18:06 [patch] Staging: iio/dac/ad5504: uninitialized variable in error Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox