浏览代码

clk: use IS_ERR_OR_NULL(hw) instead of !hw || IS_ERR(hw)

This minor refactoring does not change the function behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Masahiro Yamada 9 年之前
父节点
当前提交
c1de13574d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/clk/clk.c

+ 1 - 1
drivers/clk/clk.c

@@ -2482,7 +2482,7 @@ struct clk *__clk_create_clk(struct clk_hw *hw, const char *dev_id,
 	struct clk *clk;
 
 	/* This is to allow this function to be chained to others */
-	if (!hw || IS_ERR(hw))
+	if (IS_ERR_OR_NULL(hw))
 		return (struct clk *) hw;
 
 	clk = kzalloc(sizeof(*clk), GFP_KERNEL);