clk: use ERR_CAST() for __clk_create_clk()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 19 Jul 2016 07:28:47 +0000 (16:28 +0900)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 13 Aug 2016 01:17:04 +0000 (18:17 -0700)
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>
drivers/clk/clk.c

index 0c6009a..6298715 100644 (file)
@@ -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)