Skip to content

Commit

Permalink
clk: use IS_ERR_OR_NULL(hw) instead of !hw || IS_ERR(hw)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masahiro Yamada authored and Stephen Boyd committed Nov 20, 2015
1 parent c736c4e commit c1de135
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c1de135

Please sign in to comment.