All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: stmpe: fix error path
@ 2010-09-12 18:57 ` Vasiliy Kulikov
  0 siblings, 0 replies; 10+ messages in thread
From: Vasiliy Kulikov @ 2010-09-12 18:57 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Rabin Vincent, Samuel Ortiz, Wolfram Sang, Luotao Fu,
	Linus Walleij, linux-kernel

Free allocated memory.  Call stmpe_disable() if it was enabled.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
 Compile tested.
 Maybe It needs better error path.

 drivers/gpio/stmpe-gpio.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
index 65b9960..6e28afa 100644
--- a/drivers/gpio/stmpe-gpio.c
+++ b/drivers/gpio/stmpe-gpio.c
@@ -317,11 +317,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
 
 	ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
 	if (ret)
-		return ret;
+		goto out_free;
 
 	ret = stmpe_gpio_irq_init(stmpe_gpio);
 	if (ret)
-		goto out_free;
+		goto out_disable;
 
 	ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
 				   "stmpe-gpio", stmpe_gpio);
@@ -347,6 +347,8 @@ out_freeirq:
 	free_irq(irq, stmpe_gpio);
 out_removeirq:
 	stmpe_gpio_irq_remove(stmpe_gpio);
+out_disable:
+	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
 out_free:
 	kfree(stmpe_gpio);
 	return ret;
-- 
1.7.0.4


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

* [PATCH] gpio: stmpe: fix error path
@ 2010-09-12 18:57 ` Vasiliy Kulikov
  0 siblings, 0 replies; 10+ messages in thread
From: Vasiliy Kulikov @ 2010-09-12 18:57 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Rabin Vincent, Samuel Ortiz, Wolfram Sang, Luotao Fu,
	Linus Walleij, linux-kernel

Free allocated memory.  Call stmpe_disable() if it was enabled.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
 Compile tested.
 Maybe It needs better error path.

 drivers/gpio/stmpe-gpio.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
index 65b9960..6e28afa 100644
--- a/drivers/gpio/stmpe-gpio.c
+++ b/drivers/gpio/stmpe-gpio.c
@@ -317,11 +317,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
 
 	ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
 	if (ret)
-		return ret;
+		goto out_free;
 
 	ret = stmpe_gpio_irq_init(stmpe_gpio);
 	if (ret)
-		goto out_free;
+		goto out_disable;
 
 	ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
 				   "stmpe-gpio", stmpe_gpio);
@@ -347,6 +347,8 @@ out_freeirq:
 	free_irq(irq, stmpe_gpio);
 out_removeirq:
 	stmpe_gpio_irq_remove(stmpe_gpio);
+out_disable:
+	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
 out_free:
 	kfree(stmpe_gpio);
 	return ret;
-- 
1.7.0.4


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

* Re: [PATCH] gpio: stmpe: fix error path
  2010-09-12 18:57 ` Vasiliy Kulikov
@ 2010-09-13 19:37   ` Wolfram Sang
  -1 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2010-09-13 19:37 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Rabin Vincent, Samuel Ortiz, Luotao Fu,
	Linus Walleij, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]

On Sun, Sep 12, 2010 at 10:57:19PM +0400, Vasiliy Kulikov wrote:
> Free allocated memory.  Call stmpe_disable() if it was enabled.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
>  Compile tested.
>  Maybe It needs better error path.

What do you mean here? Looks good to me so far.

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

> 
>  drivers/gpio/stmpe-gpio.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
> index 65b9960..6e28afa 100644
> --- a/drivers/gpio/stmpe-gpio.c
> +++ b/drivers/gpio/stmpe-gpio.c
> @@ -317,11 +317,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
>  
>  	ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
>  	if (ret)
> -		return ret;
> +		goto out_free;
>  
>  	ret = stmpe_gpio_irq_init(stmpe_gpio);
>  	if (ret)
> -		goto out_free;
> +		goto out_disable;
>  
>  	ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
>  				   "stmpe-gpio", stmpe_gpio);
> @@ -347,6 +347,8 @@ out_freeirq:
>  	free_irq(irq, stmpe_gpio);
>  out_removeirq:
>  	stmpe_gpio_irq_remove(stmpe_gpio);
> +out_disable:
> +	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
>  out_free:
>  	kfree(stmpe_gpio);
>  	return ret;
> -- 
> 1.7.0.4
> 

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] gpio: stmpe: fix error path
@ 2010-09-13 19:37   ` Wolfram Sang
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfram Sang @ 2010-09-13 19:37 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Rabin Vincent, Samuel Ortiz, Luotao Fu,
	Linus Walleij, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]

On Sun, Sep 12, 2010 at 10:57:19PM +0400, Vasiliy Kulikov wrote:
> Free allocated memory.  Call stmpe_disable() if it was enabled.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
>  Compile tested.
>  Maybe It needs better error path.

What do you mean here? Looks good to me so far.

Acked-by: Wolfram Sang <w.sang@pengutronix.de>

> 
>  drivers/gpio/stmpe-gpio.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
> index 65b9960..6e28afa 100644
> --- a/drivers/gpio/stmpe-gpio.c
> +++ b/drivers/gpio/stmpe-gpio.c
> @@ -317,11 +317,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
>  
>  	ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
>  	if (ret)
> -		return ret;
> +		goto out_free;
>  
>  	ret = stmpe_gpio_irq_init(stmpe_gpio);
>  	if (ret)
> -		goto out_free;
> +		goto out_disable;
>  
>  	ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
>  				   "stmpe-gpio", stmpe_gpio);
> @@ -347,6 +347,8 @@ out_freeirq:
>  	free_irq(irq, stmpe_gpio);
>  out_removeirq:
>  	stmpe_gpio_irq_remove(stmpe_gpio);
> +out_disable:
> +	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
>  out_free:
>  	kfree(stmpe_gpio);
>  	return ret;
> -- 
> 1.7.0.4
> 

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: [PATCH] gpio: stmpe: fix error path
  2010-09-12 18:57 ` Vasiliy Kulikov
@ 2010-09-14  4:01   ` Rabin Vincent
  -1 siblings, 0 replies; 10+ messages in thread
From: Rabin Vincent @ 2010-09-14  3:49 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Samuel Ortiz, Wolfram Sang, Luotao Fu,
	Linus WALLEIJ, linux-kernel

On Sun, Sep 12, 2010 at 20:57:19 +0200, Vasiliy Kulikov wrote:
> Free allocated memory.  Call stmpe_disable() if it was enabled.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>

Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>

Thanks,
Rabin

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

* Re: [PATCH] gpio: stmpe: fix error path
@ 2010-09-14  4:01   ` Rabin Vincent
  0 siblings, 0 replies; 10+ messages in thread
From: Rabin Vincent @ 2010-09-14  4:01 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Samuel Ortiz, Wolfram Sang, Luotao Fu,
	Linus WALLEIJ, linux-kernel

On Sun, Sep 12, 2010 at 20:57:19 +0200, Vasiliy Kulikov wrote:
> Free allocated memory.  Call stmpe_disable() if it was enabled.
> 
> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>

Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>

Thanks,
Rabin

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

* Re: [PATCH] gpio: stmpe: fix error path
  2010-09-13 19:37   ` Wolfram Sang
@ 2010-09-18 11:21     ` Vasiliy Kulikov
  -1 siblings, 0 replies; 10+ messages in thread
From: Vasiliy Kulikov @ 2010-09-18 11:21 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: kernel-janitors, Rabin Vincent, Samuel Ortiz, Luotao Fu,
	Linus Walleij, linux-kernel

On Mon, Sep 13, 2010 at 21:37 +0200, Wolfram Sang wrote:
> On Sun, Sep 12, 2010 at 10:57:19PM +0400, Vasiliy Kulikov wrote:
> > Free allocated memory.  Call stmpe_disable() if it was enabled.
> > 
> > Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> > ---
> >  Compile tested.
> >  Maybe It needs better error path.
> 
> What do you mean here? Looks good to me so far.

Forget it, I was wrong ;)


-- 
Vasiliy

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

* Re: [PATCH] gpio: stmpe: fix error path
@ 2010-09-18 11:21     ` Vasiliy Kulikov
  0 siblings, 0 replies; 10+ messages in thread
From: Vasiliy Kulikov @ 2010-09-18 11:21 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: kernel-janitors, Rabin Vincent, Samuel Ortiz, Luotao Fu,
	Linus Walleij, linux-kernel

On Mon, Sep 13, 2010 at 21:37 +0200, Wolfram Sang wrote:
> On Sun, Sep 12, 2010 at 10:57:19PM +0400, Vasiliy Kulikov wrote:
> > Free allocated memory.  Call stmpe_disable() if it was enabled.
> > 
> > Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> > ---
> >  Compile tested.
> >  Maybe It needs better error path.
> 
> What do you mean here? Looks good to me so far.

Forget it, I was wrong ;)


-- 
Vasiliy

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

* Re: [PATCH] gpio: stmpe: fix error path
  2010-09-12 18:57 ` Vasiliy Kulikov
@ 2010-09-27 10:01   ` Samuel Ortiz
  -1 siblings, 0 replies; 10+ messages in thread
From: Samuel Ortiz @ 2010-09-27 10:01 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Rabin Vincent, Wolfram Sang, Luotao Fu,
	Linus Walleij, linux-kernel

Hi Vasiliy,

On Sun, Sep 12, 2010 at 10:57:19PM +0400, Vasiliy Kulikov wrote:
> Free allocated memory.  Call stmpe_disable() if it was enabled.
Patch applied, thanks.


> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
>  Compile tested.
>  Maybe It needs better error path.
> 
>  drivers/gpio/stmpe-gpio.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
> index 65b9960..6e28afa 100644
> --- a/drivers/gpio/stmpe-gpio.c
> +++ b/drivers/gpio/stmpe-gpio.c
> @@ -317,11 +317,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
>  
>  	ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
>  	if (ret)
> -		return ret;
> +		goto out_free;
>  
>  	ret = stmpe_gpio_irq_init(stmpe_gpio);
>  	if (ret)
> -		goto out_free;
> +		goto out_disable;
>  
>  	ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
>  				   "stmpe-gpio", stmpe_gpio);
> @@ -347,6 +347,8 @@ out_freeirq:
>  	free_irq(irq, stmpe_gpio);
>  out_removeirq:
>  	stmpe_gpio_irq_remove(stmpe_gpio);
> +out_disable:
> +	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
>  out_free:
>  	kfree(stmpe_gpio);
>  	return ret;
> -- 
> 1.7.0.4
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH] gpio: stmpe: fix error path
@ 2010-09-27 10:01   ` Samuel Ortiz
  0 siblings, 0 replies; 10+ messages in thread
From: Samuel Ortiz @ 2010-09-27 10:01 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Rabin Vincent, Wolfram Sang, Luotao Fu,
	Linus Walleij, linux-kernel

Hi Vasiliy,

On Sun, Sep 12, 2010 at 10:57:19PM +0400, Vasiliy Kulikov wrote:
> Free allocated memory.  Call stmpe_disable() if it was enabled.
Patch applied, thanks.


> Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
> ---
>  Compile tested.
>  Maybe It needs better error path.
> 
>  drivers/gpio/stmpe-gpio.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpio/stmpe-gpio.c b/drivers/gpio/stmpe-gpio.c
> index 65b9960..6e28afa 100644
> --- a/drivers/gpio/stmpe-gpio.c
> +++ b/drivers/gpio/stmpe-gpio.c
> @@ -317,11 +317,11 @@ static int __devinit stmpe_gpio_probe(struct platform_device *pdev)
>  
>  	ret = stmpe_enable(stmpe, STMPE_BLOCK_GPIO);
>  	if (ret)
> -		return ret;
> +		goto out_free;
>  
>  	ret = stmpe_gpio_irq_init(stmpe_gpio);
>  	if (ret)
> -		goto out_free;
> +		goto out_disable;
>  
>  	ret = request_threaded_irq(irq, NULL, stmpe_gpio_irq, IRQF_ONESHOT,
>  				   "stmpe-gpio", stmpe_gpio);
> @@ -347,6 +347,8 @@ out_freeirq:
>  	free_irq(irq, stmpe_gpio);
>  out_removeirq:
>  	stmpe_gpio_irq_remove(stmpe_gpio);
> +out_disable:
> +	stmpe_disable(stmpe, STMPE_BLOCK_GPIO);
>  out_free:
>  	kfree(stmpe_gpio);
>  	return ret;
> -- 
> 1.7.0.4
> 

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

end of thread, other threads:[~2010-09-27 10:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-12 18:57 [PATCH] gpio: stmpe: fix error path Vasiliy Kulikov
2010-09-12 18:57 ` Vasiliy Kulikov
2010-09-13 19:37 ` Wolfram Sang
2010-09-13 19:37   ` Wolfram Sang
2010-09-18 11:21   ` Vasiliy Kulikov
2010-09-18 11:21     ` Vasiliy Kulikov
2010-09-14  3:49 ` Rabin Vincent
2010-09-14  4:01   ` Rabin Vincent
2010-09-27 10:01 ` Samuel Ortiz
2010-09-27 10:01   ` Samuel Ortiz

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.