From: Wei Yongjun Date: Sat, 12 Oct 2013 06:46:00 +0000 (+0100) Subject: iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe() X-Git-Tag: upstream/snapshot3+hdmi~4138^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00bfacfeb4a70053527b2b9ba2eb09ce0be0c1a4;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe() Add the missing clk_disable_unprepare() before return from adf4350_probe() in the error handling case. Signed-off-by: Wei Yongjun Reviewed-by: Lars-Peter CLausen Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index a7b30be..52605c0 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -525,8 +525,10 @@ static int adf4350_probe(struct spi_device *spi) } indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); - if (indio_dev == NULL) - return -ENOMEM; + if (indio_dev == NULL) { + ret = -ENOMEM; + goto error_disable_clk; + } st = iio_priv(indio_dev);