Skip to content

Commit

Permalink
staging:iio:dac:ad5504 dereferencing just freed st in error path.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 8df3223 commit 0cbb2b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/dac/ad5504.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ static int __devinit ad5504_probe(struct spi_device *spi)
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);
Expand Down

0 comments on commit 0cbb2b5

Please sign in to comment.