All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-19 20:29 ` Christophe JAILLET
  0 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-19 20:29 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, michal.simek, soren.brinkmann
  Cc: linux-iio, linux-arm-kernel, linux-kernel, kernel-janitors,
	Christophe JAILLET

Reorder error handling labels in order to match the way resources have
been allocated.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/iio/adc/xilinx-xadc-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 0a6beb3d99cb..515b91963db5 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -1268,6 +1268,8 @@ static int xadc_probe(struct platform_device *pdev)
 
 err_free_irq:
 	free_irq(irq, indio_dev);
+err_clk_disable_unprepare:
+	clk_disable_unprepare(xadc->clk);
 err_free_samplerate_trigger:
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
 		iio_trigger_free(xadc->samplerate_trigger);
@@ -1277,8 +1279,6 @@ static int xadc_probe(struct platform_device *pdev)
 err_triggered_buffer_cleanup:
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
 		iio_triggered_buffer_cleanup(indio_dev);
-err_clk_disable_unprepare:
-	clk_disable_unprepare(xadc->clk);
 err_device_free:
 	kfree(indio_dev->channels);
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-19 20:29 ` Christophe JAILLET
  0 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-19 20:29 UTC (permalink / raw)
  To: linux-arm-kernel

Reorder error handling labels in order to match the way resources have
been allocated.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/iio/adc/xilinx-xadc-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 0a6beb3d99cb..515b91963db5 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -1268,6 +1268,8 @@ static int xadc_probe(struct platform_device *pdev)
 
 err_free_irq:
 	free_irq(irq, indio_dev);
+err_clk_disable_unprepare:
+	clk_disable_unprepare(xadc->clk);
 err_free_samplerate_trigger:
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
 		iio_trigger_free(xadc->samplerate_trigger);
@@ -1277,8 +1279,6 @@ static int xadc_probe(struct platform_device *pdev)
 err_triggered_buffer_cleanup:
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
 		iio_triggered_buffer_cleanup(indio_dev);
-err_clk_disable_unprepare:
-	clk_disable_unprepare(xadc->clk);
 err_device_free:
 	kfree(indio_dev->channels);
 
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-19 20:29 ` Christophe JAILLET
  0 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-19 20:29 UTC (permalink / raw)
  To: linux-arm-kernel

Reorder error handling labels in order to match the way resources have
been allocated.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/iio/adc/xilinx-xadc-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 0a6beb3d99cb..515b91963db5 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -1268,6 +1268,8 @@ static int xadc_probe(struct platform_device *pdev)
 
 err_free_irq:
 	free_irq(irq, indio_dev);
+err_clk_disable_unprepare:
+	clk_disable_unprepare(xadc->clk);
 err_free_samplerate_trigger:
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
 		iio_trigger_free(xadc->samplerate_trigger);
@@ -1277,8 +1279,6 @@ static int xadc_probe(struct platform_device *pdev)
 err_triggered_buffer_cleanup:
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
 		iio_triggered_buffer_cleanup(indio_dev);
-err_clk_disable_unprepare:
-	clk_disable_unprepare(xadc->clk);
 err_device_free:
 	kfree(indio_dev->channels);
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] iio: adc: xilinx: Fix error handling
  2017-02-19 20:29 ` Christophe JAILLET
  (?)
@ 2017-02-20  8:35   ` Lars-Peter Clausen
  -1 siblings, 0 replies; 13+ messages in thread
From: Lars-Peter Clausen @ 2017-02-20  8:35 UTC (permalink / raw)
  To: Christophe JAILLET, jic23, knaack.h, pmeerw, michal.simek,
	soren.brinkmann
  Cc: linux-iio, linux-arm-kernel, linux-kernel, kernel-janitors

On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
> Reorder error handling labels in order to match the way resources have
> been allocated.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Thanks, looks good.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

I think there is one more issue

    ret = xadc->ops->setup(pdev, indio_dev, irq);
    if (ret)
        goto err_free_samplerate_trigger;

should be

	goto err_clk_disable_unprepare;

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-20  8:35   ` Lars-Peter Clausen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars-Peter Clausen @ 2017-02-20  8:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
> Reorder error handling labels in order to match the way resources have
> been allocated.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Thanks, looks good.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

I think there is one more issue

    ret = xadc->ops->setup(pdev, indio_dev, irq);
    if (ret)
        goto err_free_samplerate_trigger;

should be

	goto err_clk_disable_unprepare;


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-20  8:35   ` Lars-Peter Clausen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars-Peter Clausen @ 2017-02-20  8:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
> Reorder error handling labels in order to match the way resources have
> been allocated.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Thanks, looks good.

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

I think there is one more issue

    ret = xadc->ops->setup(pdev, indio_dev, irq);
    if (ret)
        goto err_free_samplerate_trigger;

should be

	goto err_clk_disable_unprepare;

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] iio: adc: xilinx: Fix error handling
  2017-02-20  8:35   ` Lars-Peter Clausen
  (?)
  (?)
@ 2017-02-20 20:25   ` Christophe JAILLET
  -1 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-20 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

Le 20/02/2017 ? 09:35, Lars-Peter Clausen a ?crit :
> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>> Reorder error handling labels in order to match the way resources have
>> been allocated.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Thanks, looks good.
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
>
> I think there is one more issue
>
>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>      if (ret)
>          goto err_free_samplerate_trigger;
>
> should be
>
> 	goto err_clk_disable_unprepare;
>
I agree.

Would you like me to send a V2 with both fixes or a sepparate patch?

CJ

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] iio: adc: xilinx: Fix error handling
  2017-02-19 20:29 ` Christophe JAILLET
  (?)
@ 2017-02-20 20:25   ` Christophe JAILLET
  -1 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-20 20:25 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, michal.simek, soren.brinkmann
  Cc: linux-iio, linux-arm-kernel, linux-kernel, kernel-janitors

Le 20/02/2017 à 09:35, Lars-Peter Clausen a écrit :
> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>> Reorder error handling labels in order to match the way resources have
>> been allocated.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
> Thanks, looks good.
>
> Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>
> I think there is one more issue
>
>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>      if (ret)
>          goto err_free_samplerate_trigger;
>
> should be
>
> 	goto err_clk_disable_unprepare;
>
I agree.

Would you like me to send a V2 with both fixes or a sepparate patch?

CJ

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-20 20:25   ` Christophe JAILLET
  0 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-20 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

Le 20/02/2017 à 09:35, Lars-Peter Clausen a écrit :
> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>> Reorder error handling labels in order to match the way resources have
>> been allocated.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
> Thanks, looks good.
>
> Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>
> I think there is one more issue
>
>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>      if (ret)
>          goto err_free_samplerate_trigger;
>
> should be
>
> 	goto err_clk_disable_unprepare;
>
I agree.

Would you like me to send a V2 with both fixes or a sepparate patch?

CJ

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-20 20:25   ` Christophe JAILLET
  0 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2017-02-20 20:25 UTC (permalink / raw)
  To: linux-arm-kernel

Le 20/02/2017 ? 09:35, Lars-Peter Clausen a ?crit :
> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>> Reorder error handling labels in order to match the way resources have
>> been allocated.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
> Thanks, looks good.
>
> Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>
> I think there is one more issue
>
>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>      if (ret)
>          goto err_free_samplerate_trigger;
>
> should be
>
> 	goto err_clk_disable_unprepare;
>
I agree.

Would you like me to send a V2 with both fixes or a sepparate patch?

CJ

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] iio: adc: xilinx: Fix error handling
  2017-02-20 20:25   ` Christophe JAILLET
  (?)
@ 2017-02-20 20:58     ` Lars-Peter Clausen
  -1 siblings, 0 replies; 13+ messages in thread
From: Lars-Peter Clausen @ 2017-02-20 20:58 UTC (permalink / raw)
  To: Christophe JAILLET, jic23, knaack.h, pmeerw, michal.simek,
	soren.brinkmann
  Cc: linux-iio, linux-arm-kernel, linux-kernel, kernel-janitors

On 02/20/2017 09:25 PM, Christophe JAILLET wrote:
> Le 20/02/2017 à 09:35, Lars-Peter Clausen a écrit :
>> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>>> Reorder error handling labels in order to match the way resources have
>>> been allocated.
>>>
>>> Signed-off-by: Christophe JAILLET
>>> <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
>> Thanks, looks good.
>>
>> Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>>
>> I think there is one more issue
>>
>>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>>      if (ret)
>>          goto err_free_samplerate_trigger;
>>
>> should be
>>
>>     goto err_clk_disable_unprepare;
>>
> I agree.
> 
> Would you like me to send a V2 with both fixes or a sepparate patch?

Up to you.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-20 20:58     ` Lars-Peter Clausen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars-Peter Clausen @ 2017-02-20 20:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/20/2017 09:25 PM, Christophe JAILLET wrote:
> Le 20/02/2017 à 09:35, Lars-Peter Clausen a écrit :
>> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>>> Reorder error handling labels in order to match the way resources have
>>> been allocated.
>>>
>>> Signed-off-by: Christophe JAILLET
>>> <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
>> Thanks, looks good.
>>
>> Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>>
>> I think there is one more issue
>>
>>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>>      if (ret)
>>          goto err_free_samplerate_trigger;
>>
>> should be
>>
>>     goto err_clk_disable_unprepare;
>>
> I agree.
> 
> Would you like me to send a V2 with both fixes or a sepparate patch?

Up to you.

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] iio: adc: xilinx: Fix error handling
@ 2017-02-20 20:58     ` Lars-Peter Clausen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars-Peter Clausen @ 2017-02-20 20:58 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/20/2017 09:25 PM, Christophe JAILLET wrote:
> Le 20/02/2017 ? 09:35, Lars-Peter Clausen a ?crit :
>> On 02/19/2017 09:29 PM, Christophe JAILLET wrote:
>>> Reorder error handling labels in order to match the way resources have
>>> been allocated.
>>>
>>> Signed-off-by: Christophe JAILLET
>>> <christophe.jaillet-39ZsbGIQGT5GWvitb5QawA@public.gmane.org>
>> Thanks, looks good.
>>
>> Acked-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>>
>> I think there is one more issue
>>
>>      ret = xadc->ops->setup(pdev, indio_dev, irq);
>>      if (ret)
>>          goto err_free_samplerate_trigger;
>>
>> should be
>>
>>     goto err_clk_disable_unprepare;
>>
> I agree.
> 
> Would you like me to send a V2 with both fixes or a sepparate patch?

Up to you.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-02-20 21:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-19 20:29 [PATCH] iio: adc: xilinx: Fix error handling Christophe JAILLET
2017-02-19 20:29 ` Christophe JAILLET
2017-02-19 20:29 ` Christophe JAILLET
2017-02-20  8:35 ` Lars-Peter Clausen
2017-02-20  8:35   ` Lars-Peter Clausen
2017-02-20  8:35   ` Lars-Peter Clausen
2017-02-20 20:25   ` Christophe JAILLET
2017-02-20 20:25 ` Christophe JAILLET
2017-02-20 20:25   ` Christophe JAILLET
2017-02-20 20:25   ` Christophe JAILLET
2017-02-20 20:58   ` Lars-Peter Clausen
2017-02-20 20:58     ` Lars-Peter Clausen
2017-02-20 20:58     ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.