All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 14:22 ` Timur Tabi
  0 siblings, 0 replies; 16+ messages in thread
From: Timur Tabi @ 2011-08-22 14:22 UTC (permalink / raw)
  To: kernel-janitors, lrg, broonie, perex, tiwai, grant.likely,
	alsa-devel

of_parse_phandle increments the reference count of np, so this should be
decremented before trying the next possibility.

Since we don't actually use np, we can decrement the reference count
immediately.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Timur Tabi <timur@freescale.com>
---
 sound/soc/fsl/fsl_dma.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 6680c0b..b300f4b 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
 		 * assume that device_node pointers are a valid comparison.
 		 */
 		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
+		of_node_put(np);
 		if (np == dma_channel_np)
 			return ssi_np;
 
 		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
+		of_node_put(np);
 		if (np == dma_channel_np)
 			return ssi_np;
 	}
-- 
1.7.3.4

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

* [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 14:22 ` Timur Tabi
  0 siblings, 0 replies; 16+ messages in thread
From: Timur Tabi @ 2011-08-22 14:22 UTC (permalink / raw)
  To: kernel-janitors, lrg, broonie, perex, tiwai, grant.likely,
	alsa-devel

of_parse_phandle increments the reference count of np, so this should be
decremented before trying the next possibility.

Since we don't actually use np, we can decrement the reference count
immediately.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Timur Tabi <timur@freescale.com>
---
 sound/soc/fsl/fsl_dma.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 6680c0b..b300f4b 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
 		 * assume that device_node pointers are a valid comparison.
 		 */
 		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
+		of_node_put(np);
 		if (np = dma_channel_np)
 			return ssi_np;
 
 		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
+		of_node_put(np);
 		if (np = dma_channel_np)
 			return ssi_np;
 	}
-- 
1.7.3.4



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

* [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 14:22 ` Timur Tabi
  0 siblings, 0 replies; 16+ messages in thread
From: Timur Tabi @ 2011-08-22 14:22 UTC (permalink / raw)
  To: kernel-janitors, lrg, broonie, perex, tiwai, grant.likely,
	alsa-devel, linuxppc-dev, linux-kernel, devicetree-discuss, julia

of_parse_phandle increments the reference count of np, so this should be
decremented before trying the next possibility.

Since we don't actually use np, we can decrement the reference count
immediately.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Timur Tabi <timur@freescale.com>
---
 sound/soc/fsl/fsl_dma.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 6680c0b..b300f4b 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
 		 * assume that device_node pointers are a valid comparison.
 		 */
 		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
+		of_node_put(np);
 		if (np == dma_channel_np)
 			return ssi_np;
 
 		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
+		of_node_put(np);
 		if (np == dma_channel_np)
 			return ssi_np;
 	}
-- 
1.7.3.4

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

* [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 14:22 Timur Tabi
  0 siblings, 0 replies; 16+ messages in thread
From: Timur Tabi @ 2011-08-22 14:22 UTC (permalink / raw)
  To: kernel-janitors-u79uwXL29TY76Z2rM5mHXA, lrg-l0cyMroinI0,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	perex-/Fr2/VpizcU, tiwai-l3A5Bk7waGM,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

of_parse_phandle increments the reference count of np, so this should be
decremented before trying the next possibility.

Since we don't actually use np, we can decrement the reference count
immediately.

Reported-by: Julia Lawall <julia-dAYI7NvHqcQ@public.gmane.org>
Signed-off-by: Timur Tabi <timur-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
---
 sound/soc/fsl/fsl_dma.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 6680c0b..b300f4b 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
 		 * assume that device_node pointers are a valid comparison.
 		 */
 		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
+		of_node_put(np);
 		if (np == dma_channel_np)
 			return ssi_np;
 
 		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
+		of_node_put(np);
 		if (np == dma_channel_np)
 			return ssi_np;
 	}
-- 
1.7.3.4

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
  2011-08-22 14:22 ` Timur Tabi
  (?)
  (?)
@ 2011-08-22 20:05   ` Liam Girdwood
  -1 siblings, 0 replies; 16+ messages in thread
From: Liam Girdwood @ 2011-08-22 20:05 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	devicetree-discuss@lists.ozlabs.org,
	broonie@opensource.wolfsonmicro.com,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	grant.likely@secretlab.ca, julia@diku.dk,
	linuxppc-dev@lists.ozlabs.org

On 22/08/11 15:22, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.
> 
> Reported-by: Julia Lawall <julia@diku.dk>
> Signed-off-by: Timur Tabi <timur@freescale.com>

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

> ---
>  sound/soc/fsl/fsl_dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index 6680c0b..b300f4b 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
>  		 * assume that device_node pointers are a valid comparison.
>  		 */
>  		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
> +		of_node_put(np);
>  		if (np == dma_channel_np)
>  			return ssi_np;
>  
>  		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
> +		of_node_put(np);
>  		if (np == dma_channel_np)
>  			return ssi_np;
>  	}

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 20:05   ` Liam Girdwood
  0 siblings, 0 replies; 16+ messages in thread
From: Liam Girdwood @ 2011-08-22 20:05 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	devicetree-discuss@lists.ozlabs.org,
	broonie@opensource.wolfsonmicro.com,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	grant.likely@secretlab.ca, julia@diku.dk,
	linuxppc-dev@lists.ozlabs.org

On 22/08/11 15:22, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.
> 
> Reported-by: Julia Lawall <julia@diku.dk>
> Signed-off-by: Timur Tabi <timur@freescale.com>

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

> ---
>  sound/soc/fsl/fsl_dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index 6680c0b..b300f4b 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
>  		 * assume that device_node pointers are a valid comparison.
>  		 */
>  		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
> +		of_node_put(np);
>  		if (np = dma_channel_np)
>  			return ssi_np;
>  
>  		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
> +		of_node_put(np);
>  		if (np = dma_channel_np)
>  			return ssi_np;
>  	}


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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 20:05   ` Liam Girdwood
  0 siblings, 0 replies; 16+ messages in thread
From: Liam Girdwood @ 2011-08-22 20:05 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	devicetree-discuss@lists.ozlabs.org,
	broonie@opensource.wolfsonmicro.com,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	perex@perex.cz, julia@diku.dk, linuxppc-dev@lists.ozlabs.org

On 22/08/11 15:22, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.
> 
> Reported-by: Julia Lawall <julia@diku.dk>
> Signed-off-by: Timur Tabi <timur@freescale.com>

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

> ---
>  sound/soc/fsl/fsl_dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index 6680c0b..b300f4b 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
>  		 * assume that device_node pointers are a valid comparison.
>  		 */
>  		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
> +		of_node_put(np);
>  		if (np == dma_channel_np)
>  			return ssi_np;
>  
>  		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
> +		of_node_put(np);
>  		if (np == dma_channel_np)
>  			return ssi_np;
>  	}

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 20:05   ` Liam Girdwood
  0 siblings, 0 replies; 16+ messages in thread
From: Liam Girdwood @ 2011-08-22 20:05 UTC (permalink / raw)
  To: Timur Tabi
  Cc: kernel-janitors@vger.kernel.org,
	broonie@opensource.wolfsonmicro.com, perex@perex.cz,
	tiwai@suse.de, grant.likely@secretlab.ca,
	alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	julia@diku.dk

On 22/08/11 15:22, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.
> 
> Reported-by: Julia Lawall <julia@diku.dk>
> Signed-off-by: Timur Tabi <timur@freescale.com>

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

> ---
>  sound/soc/fsl/fsl_dma.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
> index 6680c0b..b300f4b 100644
> --- a/sound/soc/fsl/fsl_dma.c
> +++ b/sound/soc/fsl/fsl_dma.c
> @@ -877,10 +877,12 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
>  		 * assume that device_node pointers are a valid comparison.
>  		 */
>  		np = of_parse_phandle(ssi_np, "fsl,playback-dma", 0);
> +		of_node_put(np);
>  		if (np == dma_channel_np)
>  			return ssi_np;
>  
>  		np = of_parse_phandle(ssi_np, "fsl,capture-dma", 0);
> +		of_node_put(np);
>  		if (np == dma_channel_np)
>  			return ssi_np;
>  	}


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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
  2011-08-22 14:22 ` Timur Tabi
  (?)
  (?)
@ 2011-08-22 22:27   ` Mark Brown
  -1 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:27 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel, tiwai, devicetree-discuss, kernel-janitors,
	linux-kernel, grant.likely, julia, linuxppc-dev, lrg

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 22:27   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:27 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel, tiwai, devicetree-discuss, kernel-janitors,
	linux-kernel, grant.likely, julia, linuxppc-dev, lrg

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 22:27   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:27 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel, tiwai, devicetree-discuss, kernel-janitors,
	linux-kernel, perex, julia, linuxppc-dev, lrg

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 22:27   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:27 UTC (permalink / raw)
  To: Timur Tabi
  Cc: kernel-janitors, lrg, perex, tiwai, grant.likely, alsa-devel,
	linuxppc-dev, linux-kernel, devicetree-discuss, julia

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
  2011-08-22 14:22 ` Timur Tabi
  (?)
  (?)
@ 2011-08-22 22:30   ` Mark Brown
  -1 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:30 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel, tiwai, devicetree-discuss, kernel-janitors,
	linux-kernel, grant.likely, julia, linuxppc-dev, lrg

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 22:30   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:30 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel, tiwai, devicetree-discuss, kernel-janitors,
	linux-kernel, grant.likely, julia, linuxppc-dev, lrg

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 22:30   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:30 UTC (permalink / raw)
  To: Timur Tabi
  Cc: alsa-devel, tiwai, devicetree-discuss, kernel-janitors,
	linux-kernel, perex, julia, linuxppc-dev, lrg

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

* Re: [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put
@ 2011-08-22 22:30   ` Mark Brown
  0 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2011-08-22 22:30 UTC (permalink / raw)
  To: Timur Tabi
  Cc: kernel-janitors, lrg, perex, tiwai, grant.likely, alsa-devel,
	linuxppc-dev, linux-kernel, devicetree-discuss, julia

On Mon, Aug 22, 2011 at 09:22:41AM -0500, Timur Tabi wrote:
> of_parse_phandle increments the reference count of np, so this should be
> decremented before trying the next possibility.
> 
> Since we don't actually use np, we can decrement the reference count
> immediately.

Applied, thanks.

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

end of thread, other threads:[~2011-08-22 22:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 14:22 [PATCH] [v2] sound/soc/fsl/fsl_dma.c: add missing of_node_put Timur Tabi
2011-08-22 14:22 ` Timur Tabi
2011-08-22 14:22 ` Timur Tabi
2011-08-22 20:05 ` Liam Girdwood
2011-08-22 20:05   ` Liam Girdwood
2011-08-22 20:05   ` Liam Girdwood
2011-08-22 20:05   ` Liam Girdwood
2011-08-22 22:27 ` Mark Brown
2011-08-22 22:27   ` Mark Brown
2011-08-22 22:27   ` Mark Brown
2011-08-22 22:27   ` Mark Brown
2011-08-22 22:30 ` Mark Brown
2011-08-22 22:30   ` Mark Brown
2011-08-22 22:30   ` Mark Brown
2011-08-22 22:30   ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-08-22 14:22 Timur Tabi

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.