浏览代码

ASoC: fsl: imx-wm8962: 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 年之前
父节点
当前提交
051c77e552
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2 4
      sound/soc/fsl/imx-wm8962.c

+ 2 - 4
sound/soc/fsl/imx-wm8962.c

@@ -281,10 +281,8 @@ static int imx_wm8962_probe(struct platform_device *pdev)
 clk_fail:
 	clk_disable_unprepare(data->codec_clk);
 fail:
-	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;
 }