drm/msm/mdp4: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare
Because clk_prepare_enable() and 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> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20201231094155.25481-1-vulab@iscas.ac.cn Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
c9ef97b694
commit
d2a7107d3a
|
@ -173,12 +173,9 @@ int mdp4_disable(struct mdp4_kms *mdp4_kms)
|
|||
DBG("");
|
||||
|
||||
clk_disable_unprepare(mdp4_kms->clk);
|
||||
if (mdp4_kms->pclk)
|
||||
clk_disable_unprepare(mdp4_kms->pclk);
|
||||
if (mdp4_kms->lut_clk)
|
||||
clk_disable_unprepare(mdp4_kms->lut_clk);
|
||||
if (mdp4_kms->axi_clk)
|
||||
clk_disable_unprepare(mdp4_kms->axi_clk);
|
||||
clk_disable_unprepare(mdp4_kms->pclk);
|
||||
clk_disable_unprepare(mdp4_kms->lut_clk);
|
||||
clk_disable_unprepare(mdp4_kms->axi_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -188,12 +185,9 @@ int mdp4_enable(struct mdp4_kms *mdp4_kms)
|
|||
DBG("");
|
||||
|
||||
clk_prepare_enable(mdp4_kms->clk);
|
||||
if (mdp4_kms->pclk)
|
||||
clk_prepare_enable(mdp4_kms->pclk);
|
||||
if (mdp4_kms->lut_clk)
|
||||
clk_prepare_enable(mdp4_kms->lut_clk);
|
||||
if (mdp4_kms->axi_clk)
|
||||
clk_prepare_enable(mdp4_kms->axi_clk);
|
||||
clk_prepare_enable(mdp4_kms->pclk);
|
||||
clk_prepare_enable(mdp4_kms->lut_clk);
|
||||
clk_prepare_enable(mdp4_kms->axi_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue