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 <yongjun_wei@trendmicro.com.cn> Reviewed-by: Lars-Peter CLausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
d0e639c9e0
commit
00bfacfeb4
|
@ -525,8 +525,10 @@ static int adf4350_probe(struct spi_device *spi)
|
||||||
}
|
}
|
||||||
|
|
||||||
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
|
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
|
||||||
if (indio_dev == NULL)
|
if (indio_dev == NULL) {
|
||||||
return -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
goto error_disable_clk;
|
||||||
|
}
|
||||||
|
|
||||||
st = iio_priv(indio_dev);
|
st = iio_priv(indio_dev);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue