staging:iio:dac:ad5504 dereferencing just freed st in error path.
Introduced when I did the iio_chan_spec conversion. Detected by smatch. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
8df322385a
commit
0cbb2b53fb
|
@ -338,7 +338,7 @@ error_free_dev:
|
||||||
iio_free_device(indio_dev);
|
iio_free_device(indio_dev);
|
||||||
error_disable_reg:
|
error_disable_reg:
|
||||||
if (!IS_ERR(reg))
|
if (!IS_ERR(reg))
|
||||||
regulator_disable(st->reg);
|
regulator_disable(reg);
|
||||||
error_put_reg:
|
error_put_reg:
|
||||||
if (!IS_ERR(reg))
|
if (!IS_ERR(reg))
|
||||||
regulator_put(reg);
|
regulator_put(reg);
|
||||||
|
|
Loading…
Reference in New Issue