From: Jonathan Cameron Date: Fri, 12 Aug 2011 15:55:33 +0000 (+0100) Subject: staging:iio:dac:ad5504 dereferencing just freed st in error path. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0cbb2b53fb57b002d0511226f3ad001569be9c66;p=mv-sheeva.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/dac/ad5504.c b/drivers/staging/iio/dac/ad5504.c index 1915f459868..88512dd6450 100644 --- a/drivers/staging/iio/dac/ad5504.c +++ b/drivers/staging/iio/dac/ad5504.c @@ -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);