summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-10-19 14:04:22 +0800
committerRob Clark <robdclark@chromium.org>2020-11-04 08:26:26 -0800
commitdd29bd41d4c6e1fc837a28f9a68bf344500dcced (patch)
treecabd012bd1963ee2d3025c75d358b9db832a932e /drivers
parente92ce317fbeb79d1e3869324059e1a47294dab18 (diff)
downloadlinux-dd29bd41d4c6e1fc837a28f9a68bf344500dcced.tar.bz2
drm/msm: Remove redundant null check
clk_prepare_enable() and clk_disable_unprepare() will check NULL clock parameter, so It is not necessary to add additional checks. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 3f192a9df0a7..4426f5074dfc 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -177,15 +177,12 @@ static int disable_clk(struct msm_gpu *gpu)
static int enable_axi(struct msm_gpu *gpu)
{
- if (gpu->ebi1_clk)
- clk_prepare_enable(gpu->ebi1_clk);
- return 0;
+ return clk_prepare_enable(gpu->ebi1_clk);
}
static int disable_axi(struct msm_gpu *gpu)
{
- if (gpu->ebi1_clk)
- clk_disable_unprepare(gpu->ebi1_clk);
+ clk_disable_unprepare(gpu->ebi1_clk);
return 0;
}