linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: use ERR_CAST() for __clk_create_clk()
@ 2016-07-19  7:28 Masahiro Yamada
  2016-08-13  1:17 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2016-07-19  7:28 UTC (permalink / raw)
  To: linux-clk; +Cc: Masahiro Yamada, Stephen Boyd, Michael Turquette, linux-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] clk: use ERR_CAST() for __clk_create_clk()
  2016-07-19  7:28 [PATCH] clk: use ERR_CAST() for __clk_create_clk() Masahiro Yamada
@ 2016-08-13  1:17 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2016-08-13  1:17 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: linux-clk, Michael Turquette, linux-kernel

On 07/19, Masahiro Yamada wrote:
> This code is clear enough, but the intention will be even clearer
> with this.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-13  1:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-19  7:28 [PATCH] clk: use ERR_CAST() for __clk_create_clk() Masahiro Yamada
2016-08-13  1:17 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).