From: Xu Wang Date: Thu, 31 Dec 2020 09:56:16 +0000 (+0000) Subject: drm/msm: dsi: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare X-Git-Tag: v6.1-rc5~2647^2~10^2~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=993247ffdd3ed5ac3319a5edcd251bef1d65083e;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20201231095616.25973-1-vulab@iscas.ac.cn Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark --- diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index c86b509..7878030 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -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); }