瀏覽代碼

clk: use ERR_CAST() for __clk_create_clk()

This code is clear enough, but the intention will be even clearer
with this.

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

+ 1 - 1
drivers/clk/clk.c

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