]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/msm: dpu: Clean up _dpu_core_video_mode_intf_connected()
authorSean Paul <seanpaul@chromium.org>
Thu, 20 Sep 2018 14:58:18 +0000 (10:58 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 17:51:30 +0000 (12:51 -0500)
Local variable is not needed and condition can't be hit.

Reviewed-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

index affc9738e2b5b5182c25b34d3b40d72c57ec2944..22e84b3d7f98ba2dffcb3928d2d3a00f7f52d753 100644 (file)
@@ -65,22 +65,17 @@ static bool _dpu_core_perf_crtc_is_power_on(struct drm_crtc *crtc)
 static bool _dpu_core_video_mode_intf_connected(struct drm_crtc *crtc)
 {
        struct drm_crtc *tmp_crtc;
-       bool intf_connected = false;
-
-       if (!crtc)
-               return intf_connected;
 
        drm_for_each_crtc(tmp_crtc, crtc->dev) {
                if ((dpu_crtc_get_intf_mode(tmp_crtc) == INTF_MODE_VIDEO) &&
                                _dpu_core_perf_crtc_is_power_on(tmp_crtc)) {
                        DPU_DEBUG("video interface connected crtc:%d\n",
                                tmp_crtc->base.id);
-                       intf_connected = true;
-                       return intf_connected;
+                       return true;
                }
        }
 
-       return intf_connected;
+       return false;
 }
 
 static void _dpu_core_perf_calc_crtc(struct dpu_kms *kms,