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


Groups > linux.kernel > #1446156 > unrolled thread

[PATCH] clk: use ERR_CAST() for __clk_create_clk()

Started byMasahiro Yamada <yamada.masahiro@socionext.com>
First post2016-07-19 09:30 +0200
Last post2016-07-19 09:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] clk: use ERR_CAST() for __clk_create_clk() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-07-19 09:30 +0200

#1446156 — [PATCH] clk: use ERR_CAST() for __clk_create_clk()

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-07-19 09:30 +0200
Subject[PATCH] clk: use ERR_CAST() for __clk_create_clk()
Message-ID<rWxDA-15B-19@gated-at.bofh.it>
This code is clear enough, but the intention will be even clearer
with this.

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 2bd00ef..953643f 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2430,7 +2430,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)
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web