Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651108 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-05-26 08:50 +0200 |
| Last post | 2017-05-28 17:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] iio: adc: xilinx: Handle return value of clk_prepare_enable Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-05-26 08:50 +0200
Re: [PATCH] iio: adc: xilinx: Handle return value of clk_prepare_enable Jonathan Cameron <jic23@kernel.org> - 2017-05-28 17:00 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-05-26 08:50 +0200 |
| Subject | [PATCH] iio: adc: xilinx: Handle return value of clk_prepare_enable |
| Message-ID | <tLheq-2se-3@gated-at.bofh.it> |
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> --- drivers/iio/adc/xilinx-xadc-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 1.9.1
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-05-28 17:00 +0200 |
| Subject | Re: [PATCH] iio: adc: xilinx: Handle return value of clk_prepare_enable |
| Message-ID | <tM7PH-3iO-3@gated-at.bofh.it> |
| In reply to | #1651108 |
On Fri, 26 May 2017 12:07:41 +0530 Arvind Yadav <arvind.yadav.cs@gmail.com> wrote: > clk_prepare_enable() can fail here and we must check its return value. > > Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Straight forward looking so I've applied this to the togreg branch of iio.git and pushed it out as testing for the autobuilders to play with it. Thanks, Jonathan > --- > drivers/iio/adc/xilinx-xadc-core.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > 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)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web