ASoC: fsl: imx-sgtl5000: Delete unneeded test before of_node_put
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 7 Oct 2014 18:13:25 +0000 (15:13 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 20 Oct 2014 11:20:15 +0000 (12:20 +0100)
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-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-sgtl5000.c

index 1cb22dd034eb63e98ac7e60e6d3ce5f719227db4..1dab963a59f722c08c216ca9a3ccc65042cf39a2 100644 (file)
@@ -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;
 }