Skip to content

Commit 00bfacf

Browse files
Wei Yongjunjic23
authored andcommitted
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>
1 parent d0e639c commit 00bfacf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/iio/frequency/adf4350.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,10 @@ static int adf4350_probe(struct spi_device *spi)
525525
}
526526

527527
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
528-
if (indio_dev == NULL)
529-
return -ENOMEM;
528+
if (indio_dev == NULL) {
529+
ret = -ENOMEM;
530+
goto error_disable_clk;
531+
}
530532

531533
st = iio_priv(indio_dev);
532534

0 commit comments

Comments
 (0)