Skip to content

Commit

Permalink
iio: frequency: adf4350: add missing clk_disable_unprepare() on error…
Browse files Browse the repository at this point in the history
… in adf4350_probe()

Add the missing clk_disable_unprepare() before return
from adf4350_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Lars-Peter CLausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Wei Yongjun authored and Jonathan Cameron committed Oct 12, 2013
1 parent d0e639c commit 00bfacf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/iio/frequency/adf4350.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 00bfacf

Please sign in to comment.