lkml.org 
[lkml]   [2019]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH-next] drm/sun4i: Use PTR_ERR_OR_ZERO in sun8i_phy_clk_create()
Date
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
---
drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c
index a4d31fe3abff..d52f581797f0 100644
--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c
+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c
@@ -171,8 +171,6 @@ int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct device *dev,
priv->hw.init = &init;

phy->clk_phy = devm_clk_register(dev, &priv->hw);
- if (IS_ERR(phy->clk_phy))
- return PTR_ERR(phy->clk_phy);

- return 0;
+ return PTR_ERR_OR_ZERO(phy->clk_phy);
}
--
2.20.1
\
 
 \ /
  Last update: 2019-02-03 01:07    [W:0.034 / U:24.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site