Skip to content

Commit

Permalink
iio: adc: xilinx: Handle return value of clk_prepare_enable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arvind Yadav authored and Jonathan Cameron committed Jun 3, 2017
1 parent ec183bf commit 0a178fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/iio/adc/xilinx-xadc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0a178fd

Please sign in to comment.