Skip to content

Commit

Permalink
drm/msm: Remove redundant null check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tian Tao authored and Rob Clark committed Nov 4, 2020
1 parent e92ce31 commit dd29bd4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/gpu/drm/msm/msm_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit dd29bd4

Please sign in to comment.