]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
amdgpu/dc: Fix double unlock in amdgpu_dm_commit_planes
authorErnst Sjöstrand <ernstp@gmail.com>
Tue, 7 Nov 2017 20:18:06 +0000 (21:18 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Nov 2017 21:22:28 +0000 (16:22 -0500)
Reported by smartch:
amdgpu_dm_commit_planes() error: double unlock 'spin_lock:&crtc->dev->event_lock'
amdgpu_dm_commit_planes() error: double unlock 'irqsave:flags'

The error path doesn't return so we only need a single unlock.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Ernst Sjöstrand <ernstp@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index cb45a3dc5a6508e2bbb995da92d18cb7b7468acf..8ed6767b46169b65128c5aaf37da851c8bf5457b 100644 (file)
@@ -3904,7 +3904,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
                        DRM_ERROR("%s: acrtc %d, already busy\n",
                                  __func__,
                                  acrtc_attach->crtc_id);
-                       spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
                        /* In commit tail framework this cannot happen */
                        WARN_ON(1);
                }