Skip to contentSkip to conversation

Staging: iio/dac/ad5504: uninitialized variable in error

PATCH New Dan Carpenter 1 participant 1 message Aug 9, 2011

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: iio/dac/ad5504: uninitialized variable in error

If we hit the "goto error_disable_reg" then the "st" variable is uninitialized.

drivers/staging/iio/dac/ad5504.c +1 -1
index 1915f45..88512dd 100644
@@ -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);