From: Masahiro Yamada Date: Tue, 19 Jul 2016 07:28:47 +0000 (+0900) Subject: clk: use ERR_CAST() for __clk_create_clk() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8a23133c7a2afc49d97b5b27caefe6847d32599e;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 0c6009a19957..6298715d0e44 100644 --- a/drivers/clk/clk.c +++ b/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)