ASoC: mc13783: Delete unneeded test before of_node_put
Subsystems (5)
PATCH 1/4 ASoC: mc13783: Delete unneeded test before of_node_put
of_node_put() supports NULL as its argument, so the initial test is not necessary.
--- sound/soc/codecs/mc13783.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/codecs/mc13783.c +1 -2
@@ -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; }
Signature · 1 line
1.9.1
PATCH 2/4 ASoC: fsl: imx-spdif: Delete unneeded test before of_node_put
of_node_put() supports NULL as its argument, so the initial test is not necessary.
--- sound/soc/fsl/imx-spdif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/fsl/imx-spdif.c +1 -2
@@ -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; }
Signature · 1 line
1.9.1
Nicolin Chen
reviewerRe: [PATCH 2/4] ASoC: fsl: imx-spdif: Delete unneeded test before of_node_put
Quoted 4 lines · Fabio Estevam
of_node_put()supports NULL as its argument, so the initial test is not necessary.Signed-off-by Fabio Estevam <[email protected]>
Acked for two fsl ones.
Thank you again
Nicolin
Quoted 21 lines
--- sound/soc/fsl/imx-spdif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)sound/soc/fsl/imx-spdif.c +1
-2@@ -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; }Signature · 1 line
1.9.1
Re: [PATCH 2/4] ASoC: fsl: imx-spdif: Delete unneeded test before of_node_put
In reply to Fabio EstevamQuoted 2 lines · Fabio Estevam
of_node_put()supports NULL as its argument, so the initial test is not necessary.
Applied, thanks.
PATCH 3/4 ASoC: fsl: eukrea-tlv320: Delete unneeded test before of_node_put
In reply to Fabio Estevamof_node_put() supports NULL as its argument, so the initial test is not necessary.
--- sound/soc/fsl/eukrea-tlv320.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/fsl/eukrea-tlv320.c +1 -2
@@ -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; }
Signature · 1 line
1.9.1
Re: [PATCH 3/4] ASoC: fsl: eukrea-tlv320: Delete unneeded test before of_node_put
Quoted 2 lines · Fabio Estevam
of_node_put()supports NULL as its argument, so the initial test is not necessary.
Applied, thanks.
PATCH 4/4 ASoC: simple-card: Delete unneeded test before of_node_put
In reply to Fabio Estevamof_node_put() supports NULL as its argument, so the initial test is not necessary.
--- sound/soc/generic/simple-card.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
sound/soc/generic/simple-card.c +5 -10
@@ -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 ; }
Signature · 1 line
1.9.1
Re: [PATCH 4/4] ASoC: simple-card: Delete unneeded test before of_node_put
Quoted 2 lines · Fabio Estevam
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.
Mark Brown
maintainersound/soc/codecs/mc13783.c static int __init mc13783_codec_probe(struct platform_device *pdev) · line 787
Quoted 4 lines · Fabio Estevam
out:
sound/soc/codecs/mc13783.c +1
-2-if (np) -of_node_put (np); +of_node_put (np);
This doesn't apply against current code, there's no np check?