linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: davinci: cfgchip: use PTR_ERR_OR_ZERO in da8xx_cfgchip_register_div4p5
@ 2019-03-15  7:29 Ding Xiang
  2019-04-11 18:45 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Ding Xiang @ 2019-03-15  7:29 UTC (permalink / raw)
  To: mturquette, sboyd, linux-clk, linux-kernel

use PTR_ERR_OR_ZERO inetead of return code

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
 drivers/clk/davinci/da8xx-cfgchip.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/clk/davinci/da8xx-cfgchip.c b/drivers/clk/davinci/da8xx-cfgchip.c
index d1bbee1..bdc5236 100644
--- a/drivers/clk/davinci/da8xx-cfgchip.c
+++ b/drivers/clk/davinci/da8xx-cfgchip.c
@@ -160,10 +160,8 @@ static int __init da8xx_cfgchip_register_div4p5(struct device *dev,
 	struct da8xx_cfgchip_gate_clk *gate;
 
 	gate = da8xx_cfgchip_gate_clk_register(dev, &da8xx_div4p5ena_info, regmap);
-	if (IS_ERR(gate))
-		return PTR_ERR(gate);
 
-	return 0;
+	return PTR_ERR_OR_ZERO(gate);
 }
 
 static int __init
-- 
1.9.1




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

* Re: [PATCH] clk: davinci: cfgchip: use PTR_ERR_OR_ZERO in da8xx_cfgchip_register_div4p5
  2019-03-15  7:29 [PATCH] clk: davinci: cfgchip: use PTR_ERR_OR_ZERO in da8xx_cfgchip_register_div4p5 Ding Xiang
@ 2019-04-11 18:45 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2019-04-11 18:45 UTC (permalink / raw)
  To: Ding Xiang, linux-clk, linux-kernel, mturquette

Quoting Ding Xiang (2019-03-15 00:29:24)
> use PTR_ERR_OR_ZERO inetead of return code
> 
> Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
> ---

Applied to clk-next


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

end of thread, other threads:[~2019-04-11 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-15  7:29 [PATCH] clk: davinci: cfgchip: use PTR_ERR_OR_ZERO in da8xx_cfgchip_register_div4p5 Ding Xiang
2019-04-11 18:45 ` 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).