Commit 0cbb2b53 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

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: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8df32238
...@@ -338,7 +338,7 @@ static int __devinit ad5504_probe(struct spi_device *spi) ...@@ -338,7 +338,7 @@ static int __devinit ad5504_probe(struct spi_device *spi)
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment