kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/10] sound/soc/nuc900/nuc900-ac97.c: add missing clk_put
@ 2011-06-01 17:10 Julia Lawall
  2011-06-01 17:12 ` Liam Girdwood
  2011-06-01 18:21 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2011-06-01 17:10 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: alsa-devel, Wan ZongShun, Takashi Iwai, Mark Brown,
	kernel-janitors, linux-kernel, Axel Lin, Timur Tabi

From: Julia Lawall <julia@diku.dk>

This goto is after the call to clk_get, so it should go to the label that
includes a call to clk_put.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression e1,e2;
statement S;
@@

e1 = clk_get@p1(...);
... when != e1 = e2
    when != clk_put(e1)
    when any
if (...) { ... when != clk_put(e1)
               when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
 } else S
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 sound/soc/nuc900/nuc900-ac97.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
index dac6732..9c0edad 100644
--- a/sound/soc/nuc900/nuc900-ac97.c
+++ b/sound/soc/nuc900/nuc900-ac97.c
@@ -356,7 +356,7 @@ static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev)
 	nuc900_audio->irq_num = platform_get_irq(pdev, 0);
 	if (!nuc900_audio->irq_num) {
 		ret = -EBUSY;
-		goto out2;
+		goto out3;
 	}
 
 	nuc900_ac97_data = nuc900_audio;


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

* Re: [PATCH 2/10] sound/soc/nuc900/nuc900-ac97.c: add missing clk_put
  2011-06-01 17:10 [PATCH 2/10] sound/soc/nuc900/nuc900-ac97.c: add missing clk_put Julia Lawall
@ 2011-06-01 17:12 ` Liam Girdwood
  2011-06-01 18:21 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-06-01 17:12 UTC (permalink / raw)
  To: Julia Lawall
  Cc: alsa-devel@alsa-project.org, Wan ZongShun, Takashi Iwai,
	Mark Brown, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org, Axel Lin, Timur Tabi

On 01/06/11 18:10, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> This goto is after the call to clk_get, so it should go to the label that
> includes a call to clk_put.
> 
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r exists@
> expression e1,e2;
> statement S;
> @@
> 
> e1 = clk_get@p1(...);
> ... when != e1 = e2
>     when != clk_put(e1)
>     when any
> if (...) { ... when != clk_put(e1)
>                when != if (...) { ... clk_put(e1) ... }
> * return@p3 ...;
>  } else S
> // </smpl>
> 
> Signed-off-by: Julia Lawall <julia@diku.dk>
> 
> ---
>  sound/soc/nuc900/nuc900-ac97.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/nuc900/nuc900-ac97.c b/sound/soc/nuc900/nuc900-ac97.c
> index dac6732..9c0edad 100644
> --- a/sound/soc/nuc900/nuc900-ac97.c
> +++ b/sound/soc/nuc900/nuc900-ac97.c
> @@ -356,7 +356,7 @@ static int __devinit nuc900_ac97_drvprobe(struct platform_device *pdev)
>  	nuc900_audio->irq_num = platform_get_irq(pdev, 0);
>  	if (!nuc900_audio->irq_num) {
>  		ret = -EBUSY;
> -		goto out2;
> +		goto out3;
>  	}
>  
>  	nuc900_ac97_data = nuc900_audio;
> 

Acked-by: Liam Girdwood <lrg@ti.com>

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

* Re: [PATCH 2/10] sound/soc/nuc900/nuc900-ac97.c: add missing clk_put
  2011-06-01 17:10 [PATCH 2/10] sound/soc/nuc900/nuc900-ac97.c: add missing clk_put Julia Lawall
  2011-06-01 17:12 ` Liam Girdwood
@ 2011-06-01 18:21 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-06-01 18:21 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Timur Tabi, Wan ZongShun, Takashi Iwai, linux-kernel,
	kernel-janitors, alsa-devel, Axel Lin, Liam Girdwood

On Wed, Jun 01, 2011 at 07:10:05PM +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
> 
> This goto is after the call to clk_get, so it should go to the label that
> includes a call to clk_put.

Applied, thanks.  Please do try to use subject lines for your patches
consistent with the code you're submitting against.

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

end of thread, other threads:[~2011-06-01 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 17:10 [PATCH 2/10] sound/soc/nuc900/nuc900-ac97.c: add missing clk_put Julia Lawall
2011-06-01 17:12 ` Liam Girdwood
2011-06-01 18:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).