lkml.org 
[lkml]   [2020]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drm/ingenic: remove redundant null check
Date
Because clk_disable_unprepare already checked NULL clock parameter,
so the additional checks are unnecessary, just remove them.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
index b7074161ccf0..9dce02e779ad 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
@@ -932,8 +932,7 @@ static int ingenic_drm_bind(struct device *dev, bool has_components)
return 0;

err_devclk_disable:
- if (priv->lcd_clk)
- clk_disable_unprepare(priv->lcd_clk);
+ clk_disable_unprepare(priv->lcd_clk);
err_pixclk_disable:
clk_disable_unprepare(priv->pix_clk);
return ret;
@@ -953,8 +952,7 @@ static void ingenic_drm_unbind(struct device *dev)
{
struct ingenic_drm *priv = dev_get_drvdata(dev);

- if (priv->lcd_clk)
- clk_disable_unprepare(priv->lcd_clk);
+ clk_disable_unprepare(priv->lcd_clk);
clk_disable_unprepare(priv->pix_clk);

drm_dev_unregister(&priv->drm);
--
2.17.1
\
 
 \ /
  Last update: 2020-09-30 10:25    [W:0.032 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site