[alsa-devel] [PATCH 2/2] ASoC: fsl: imx-sgtl5000: Delete unneeded test before of_node_put
Fabio Estevam
fabio.estevam at freescale.com
Tue Oct 7 20:13:25 CEST 2014
of_node_put() supports NULL as its argument, so the initial test is not
necessary.
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
sound/soc/fsl/imx-sgtl5000.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 1cb22dd..1dab963 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -175,10 +175,8 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
fail:
if (data && !IS_ERR(data->codec_clk))
clk_put(data->codec_clk);
- if (ssi_np)
- of_node_put(ssi_np);
- if (codec_np)
- of_node_put(codec_np);
+ of_node_put(ssi_np);
+ of_node_put(codec_np);
return ret;
}
--
1.9.1
More information about the Alsa-devel
mailing list