drm/msm: dsi: 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/20201231095616.25973-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
d2a7107d3a
commit
993247ffdd
|
@ -558,13 +558,11 @@ int dsi_link_clk_enable_6g(struct msm_dsi_host *msm_host)
|
|||
goto pixel_clk_err;
|
||||
}
|
||||
|
||||
if (msm_host->byte_intf_clk) {
|
||||
ret = clk_prepare_enable(msm_host->byte_intf_clk);
|
||||
if (ret) {
|
||||
pr_err("%s: Failed to enable byte intf clk\n",
|
||||
__func__);
|
||||
goto byte_intf_clk_err;
|
||||
}
|
||||
ret = clk_prepare_enable(msm_host->byte_intf_clk);
|
||||
if (ret) {
|
||||
pr_err("%s: Failed to enable byte intf clk\n",
|
||||
__func__);
|
||||
goto byte_intf_clk_err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -660,8 +658,7 @@ void dsi_link_clk_disable_6g(struct msm_dsi_host *msm_host)
|
|||
dev_pm_opp_set_rate(&msm_host->pdev->dev, 0);
|
||||
clk_disable_unprepare(msm_host->esc_clk);
|
||||
clk_disable_unprepare(msm_host->pixel_clk);
|
||||
if (msm_host->byte_intf_clk)
|
||||
clk_disable_unprepare(msm_host->byte_intf_clk);
|
||||
clk_disable_unprepare(msm_host->byte_intf_clk);
|
||||
clk_disable_unprepare(msm_host->byte_clk);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue