From 0cbb2b53fb57b002d0511226f3ad001569be9c66 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Fri, 12 Aug 2011 16:55:33 +0100 Subject: [PATCH] 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 --- drivers/staging/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5