Skip to contentSkip to conversation

omapdss: HDMI: simplify the return expression of hdmi_init_pll_data()

PATCH In review [email protected] 2 participants 2 messages Apr 29, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 omapdss: HDMI: simplify the return expression of hdmi_init_pll_data()

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/omapdrm/dss/hdmi_pll.c +1 -6
index eea719243eaf..10c6b3e492d3 100644
@@ -131,7 +131,6 @@ static int hdmi_init_pll_data(struct dss_device *dss,
 {
 	struct dss_pll *pll = &hpll->pll;
 	struct clk *clk;
-	int r;
 
 	clk = devm_clk_get(&pdev->dev, "sys_clk");
 	if (IS_ERR(clk)) {
@@ -151,11 +150,7 @@ static int hdmi_init_pll_data(struct dss_device *dss,
 
 	pll->ops = &hdmi_pll_ops;
 
-	r = dss_pll_register(dss, pll);
-	if (r)
-		return r;
-
-	return 0;
+	return dss_pll_register(dss, pll);
 }
 
 int hdmi_pll_init(struct dss_device *dss, struct platform_device *pdev,
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 23 lines · On 29/04/2022 12:01, [email protected] wrote:

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
  drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 7 +------
  1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/omapdrm/dss/hdmi_pll.c +0 -1
index eea719243eaf..10c6b3e492d3 100644
@@ -131,7 +131,6 @@ static int hdmi_init_pll_data(struct dss_device *dss,
  {
  	struct dss_pll *pll = &hpll->pll;
  	struct clk *clk;
-	int r;
 
  	clk = devm_clk_get(&pdev->dev, "sys_clk");
  	if (IS_ERR(clk)) {

drivers/gpu/drm/omapdrm/dss/hdmi_pll.c static int hdmi_init_pll_data(struct dss_device *dss, · line 154

Quoted 10 lines
drivers/gpu/drm/omapdrm/dss/hdmi_pll.c +1 -5
@@ -151,11 +150,7 @@ static int hdmi_init_pll_data(struct dss_device *dss,
 
  	pll->ops = &hdmi_pll_ops;
 
-	r = dss_pll_register(dss, pll);
-	if (r)
-		return r;
-
-	return 0;
+	return dss_pll_register(dss, pll);
  }

This is a rather pointless change, and I personally like the current style better.

Tomi