Commit dd29bd41 authored by Tian Tao's avatar Tian Tao Committed by Rob Clark

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: default avatarTian Tao <tiantao6@hisilicon.com>
Reviewed-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent e92ce317
...@@ -177,14 +177,11 @@ static int disable_clk(struct msm_gpu *gpu) ...@@ -177,14 +177,11 @@ static int disable_clk(struct msm_gpu *gpu)
static int enable_axi(struct msm_gpu *gpu) static int enable_axi(struct msm_gpu *gpu)
{ {
if (gpu->ebi1_clk) return clk_prepare_enable(gpu->ebi1_clk);
clk_prepare_enable(gpu->ebi1_clk);
return 0;
} }
static int disable_axi(struct msm_gpu *gpu) 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment