瀏覽代碼

ASoC: fsi: Deletion of unnecessary checks before the function call "clk_enable"

The clk_enable() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
Markus Elfring 10 年之前
父節點
當前提交
180cf794d4
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      sound/soc/sh/fsi.c

+ 3 - 6
sound/soc/sh/fsi.c

@@ -820,12 +820,9 @@ static int fsi_clk_enable(struct device *dev,
 			return ret;
 		}
 
-		if (clock->xck)
-			clk_enable(clock->xck);
-		if (clock->ick)
-			clk_enable(clock->ick);
-		if (clock->div)
-			clk_enable(clock->div);
+		clk_enable(clock->xck);
+		clk_enable(clock->ick);
+		clk_enable(clock->div);
 
 		clock->count++;
 	}