diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-26 12:07:41 +0530 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-06-03 09:55:23 +0100 |
commit | 0a178fd7327e13ec7f8079a06a20b0ee42ade1eb (patch) | |
tree | b41dae23b21ae6b45102f435d844d149bb857afd /drivers | |
parent | ec183bf8b5e5f950907705950cf3fd058b17ad1a (diff) | |
download | op-kernel-dev-0a178fd7327e13ec7f8079a06a20b0ee42ade1eb.zip op-kernel-dev-0a178fd7327e13ec7f8079a06a20b0ee42ade1eb.tar.gz |
iio: adc: xilinx: Handle return value of clk_prepare_enable
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/xilinx-xadc-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c index 56cf590..4a60497 100644 --- a/drivers/iio/adc/xilinx-xadc-core.c +++ b/drivers/iio/adc/xilinx-xadc-core.c @@ -1204,7 +1204,10 @@ static int xadc_probe(struct platform_device *pdev) ret = PTR_ERR(xadc->clk); goto err_free_samplerate_trigger; } - clk_prepare_enable(xadc->clk); + + ret = clk_prepare_enable(xadc->clk); + if (ret) + goto err_free_samplerate_trigger; ret = xadc->ops->setup(pdev, indio_dev, irq); if (ret) |