mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue