All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put
@ 2014-10-07 18:29 Fabio Estevam
  2014-10-07 18:29 ` [PATCH 2/4] ASoC: fsl: imx-spdif: " Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Fabio Estevam @ 2014-10-07 18:29 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel

of_node_put() supports NULL as its argument, so the initial test is not
necessary.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/codecs/mc13783.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 2c1f1b0..388f90a 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -784,8 +784,7 @@ static int __init mc13783_codec_probe(struct platform_device *pdev)
 			mc13783_dai_async, ARRAY_SIZE(mc13783_dai_async));
 
 out:
-	if (np)
-		of_node_put(np);
+	of_node_put(np);
 	return ret;
 }
 
-- 
1.9.1

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

* [PATCH 2/4] ASoC: fsl: imx-spdif: Delete unneeded test before of_node_put
  2014-10-07 18:29 [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put Fabio Estevam
@ 2014-10-07 18:29 ` Fabio Estevam
  2014-10-07 18:42   ` Nicolin Chen
  2014-10-07 19:01   ` Mark Brown
  2014-10-07 18:29 ` [PATCH 3/4] ASoC: fsl: eukrea-tlv320: " Fabio Estevam
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Fabio Estevam @ 2014-10-07 18:29 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel

of_node_put() supports NULL as its argument, so the initial test is not
necessary.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/fsl/imx-spdif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
index e1dc401..0c9068e 100644
--- a/sound/soc/fsl/imx-spdif.c
+++ b/sound/soc/fsl/imx-spdif.c
@@ -74,8 +74,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, data);
 
 end:
-	if (spdif_np)
-		of_node_put(spdif_np);
+	of_node_put(spdif_np);
 
 	return ret;
 }
-- 
1.9.1

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

* [PATCH 3/4] ASoC: fsl: eukrea-tlv320: Delete unneeded test before of_node_put
  2014-10-07 18:29 [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put Fabio Estevam
  2014-10-07 18:29 ` [PATCH 2/4] ASoC: fsl: imx-spdif: " Fabio Estevam
@ 2014-10-07 18:29 ` Fabio Estevam
  2014-10-07 19:01   ` Mark Brown
  2014-10-07 18:29 ` [PATCH 4/4] ASoC: simple-card: " Fabio Estevam
  2014-10-07 18:59 ` [PATCH 1/4] ASoC: mc13783: " Mark Brown
  3 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2014-10-07 18:29 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel

of_node_put() supports NULL as its argument, so the initial test is not
necessary.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/fsl/eukrea-tlv320.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c
index eb093d5..dd931fa 100644
--- a/sound/soc/fsl/eukrea-tlv320.c
+++ b/sound/soc/fsl/eukrea-tlv320.c
@@ -217,8 +217,7 @@ static int eukrea_tlv320_probe(struct platform_device *pdev)
 err:
 	if (ret)
 		dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
-	if (np)
-		of_node_put(ssi_np);
+	of_node_put(ssi_np);
 
 	return ret;
 }
-- 
1.9.1

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

* [PATCH 4/4] ASoC: simple-card: Delete unneeded test before of_node_put
  2014-10-07 18:29 [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put Fabio Estevam
  2014-10-07 18:29 ` [PATCH 2/4] ASoC: fsl: imx-spdif: " Fabio Estevam
  2014-10-07 18:29 ` [PATCH 3/4] ASoC: fsl: eukrea-tlv320: " Fabio Estevam
@ 2014-10-07 18:29 ` Fabio Estevam
  2014-10-07 19:02   ` Mark Brown
  2014-10-07 18:59 ` [PATCH 1/4] ASoC: mc13783: " Mark Brown
  3 siblings, 1 reply; 9+ messages in thread
From: Fabio Estevam @ 2014-10-07 18:29 UTC (permalink / raw)
  To: broonie; +Cc: nicoleotsuka, Fabio Estevam, alsa-devel

of_node_put() supports NULL as its argument, so the initial test is not
necessary.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 sound/soc/generic/simple-card.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index fcb431f..ecba061 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -368,12 +368,9 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
 		dai_link->cpu_dai_name = NULL;
 
 dai_link_of_err:
-	if (np)
-		of_node_put(np);
-	if (bitclkmaster)
-		of_node_put(bitclkmaster);
-	if (framemaster)
-		of_node_put(framemaster);
+	of_node_put(np);
+	of_node_put(bitclkmaster);
+	of_node_put(framemaster);
 	return ret;
 }
 
@@ -464,11 +461,9 @@ static int asoc_simple_card_unref(struct platform_device *pdev)
 	     num_links < card->num_links;
 	     num_links++, dai_link++) {
 		np = (struct device_node *) dai_link->cpu_of_node;
-		if (np)
-			of_node_put(np);
+		of_node_put(np);
 		np = (struct device_node *) dai_link->codec_of_node;
-		if (np)
-			of_node_put(np);
+		of_node_put(np);
 	}
 	return 0;
 }
-- 
1.9.1

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

* Re: [PATCH 2/4] ASoC: fsl: imx-spdif: Delete unneeded test before of_node_put
  2014-10-07 18:29 ` [PATCH 2/4] ASoC: fsl: imx-spdif: " Fabio Estevam
@ 2014-10-07 18:42   ` Nicolin Chen
  2014-10-07 19:01   ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolin Chen @ 2014-10-07 18:42 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel, broonie

On Tue, Oct 07, 2014 at 03:29:56PM -0300, Fabio Estevam wrote:
> of_node_put() supports NULL as its argument, so the initial test is not
> necessary.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Acked for two fsl ones.

Thank you again
Nicolin

> ---
>  sound/soc/fsl/imx-spdif.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
> index e1dc401..0c9068e 100644
> --- a/sound/soc/fsl/imx-spdif.c
> +++ b/sound/soc/fsl/imx-spdif.c
> @@ -74,8 +74,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, data);
>  
>  end:
> -	if (spdif_np)
> -		of_node_put(spdif_np);
> +	of_node_put(spdif_np);
>  
>  	return ret;
>  }
> -- 
> 1.9.1
> 

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

* Re: [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put
  2014-10-07 18:29 [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put Fabio Estevam
                   ` (2 preceding siblings ...)
  2014-10-07 18:29 ` [PATCH 4/4] ASoC: simple-card: " Fabio Estevam
@ 2014-10-07 18:59 ` Mark Brown
  3 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-10-07 18:59 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 190 bytes --]

On Tue, Oct 07, 2014 at 03:29:55PM -0300, Fabio Estevam wrote:

>  out:
> -	if (np)
> -		of_node_put(np);
> +	of_node_put(np);

This doesn't apply against current code, there's no np check?

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 2/4] ASoC: fsl: imx-spdif: Delete unneeded test before of_node_put
  2014-10-07 18:29 ` [PATCH 2/4] ASoC: fsl: imx-spdif: " Fabio Estevam
  2014-10-07 18:42   ` Nicolin Chen
@ 2014-10-07 19:01   ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-10-07 19:01 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 168 bytes --]

On Tue, Oct 07, 2014 at 03:29:56PM -0300, Fabio Estevam wrote:
> of_node_put() supports NULL as its argument, so the initial test is not
> necessary.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 3/4] ASoC: fsl: eukrea-tlv320: Delete unneeded test before of_node_put
  2014-10-07 18:29 ` [PATCH 3/4] ASoC: fsl: eukrea-tlv320: " Fabio Estevam
@ 2014-10-07 19:01   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-10-07 19:01 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 168 bytes --]

On Tue, Oct 07, 2014 at 03:29:57PM -0300, Fabio Estevam wrote:
> of_node_put() supports NULL as its argument, so the initial test is not
> necessary.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 4/4] ASoC: simple-card: Delete unneeded test before of_node_put
  2014-10-07 18:29 ` [PATCH 4/4] ASoC: simple-card: " Fabio Estevam
@ 2014-10-07 19:02   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-10-07 19:02 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nicoleotsuka, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 221 bytes --]

On Tue, Oct 07, 2014 at 03:29:58PM -0300, Fabio Estevam wrote:
> of_node_put() supports NULL as its argument, so the initial test is not
> necessary.

Applied, thanks, but please CC people who typically work on the code.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2014-10-07 19:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 18:29 [PATCH 1/4] ASoC: mc13783: Delete unneeded test before of_node_put Fabio Estevam
2014-10-07 18:29 ` [PATCH 2/4] ASoC: fsl: imx-spdif: " Fabio Estevam
2014-10-07 18:42   ` Nicolin Chen
2014-10-07 19:01   ` Mark Brown
2014-10-07 18:29 ` [PATCH 3/4] ASoC: fsl: eukrea-tlv320: " Fabio Estevam
2014-10-07 19:01   ` Mark Brown
2014-10-07 18:29 ` [PATCH 4/4] ASoC: simple-card: " Fabio Estevam
2014-10-07 19:02   ` Mark Brown
2014-10-07 18:59 ` [PATCH 1/4] ASoC: mc13783: " Mark Brown

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.