Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273734

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

From Masahiro Yamada <yamada.masahiro@socionext.com>
Newsgroups linux.kernel
Subject [PATCH] clk: use IS_ERR_OR_NULL(hw) instead of !hw || IS_ERR(hw)
Date 2015-11-20 06:40 +0100
Message-ID <qwMAp-2XN-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This minor refactoring does not change the function behavior.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index f13c3f4..764aca2 100644
--- a/drivers/clk/clk.c
+++ b/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);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] clk: use IS_ERR_OR_NULL(hw) instead of !hw || IS_ERR(hw) Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-11-20 06:40 +0100
  Re: [PATCH] clk: use IS_ERR_OR_NULL(hw) instead of !hw || IS_ERR(hw) Stephen Boyd <sboyd@codeaurora.org> - 2015-11-20 18:30 +0100

csiph-web