]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sat, 12 Oct 2013 06:46:00 +0000 (07:46 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 12 Oct 2013 12:20:46 +0000 (13:20 +0100)
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>
drivers/iio/frequency/adf4350.c

index a7b30be86ae06cb7ae59a077aa45ee4e58f52051..52605c0ea3a69fce7c1d312d4fa1610de43174fd 100644 (file)
@@ -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);