Переглянути джерело

ASoC: fsl: imx-sgtl5000: Delete unneeded test before of_node_put

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>
Fabio Estevam 11 роки тому
батько
коміт
7e3bc3c1c9
1 змінених файлів з 2 додано та 4 видалено
  1. 2 4
      sound/soc/fsl/imx-sgtl5000.c

+ 2 - 4
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;
 }