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:
Jonathan Cameron 2011-08-12 16:55:33 +01:00 committed by Greg Kroah-Hartman
parent 8df322385a
commit 0cbb2b53fb
1 changed files with 1 additions and 1 deletions

View File

@ -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);