Skip to content

Commit 0a1ee19

Browse files
Dan Carpentertomba
authored andcommitted
drm: zynqmp_dp: Unlock on error in zynqmp_dp_bridge_atomic_enable()
We added some locking to this function, but accidentally forgot to unlock if zynqmp_dp_mode_configure() failed. Use a guard lock to fix it. Fixes: a7d5eea ("drm: zynqmp_dp: Add locking") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5247a8b commit 0a1ee19

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/xlnx/zynqmp_dp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ static void zynqmp_dp_bridge_atomic_enable(struct drm_bridge *bridge,
15371537

15381538
pm_runtime_get_sync(dp->dev);
15391539

1540-
mutex_lock(&dp->lock);
1540+
guard(mutex)(&dp->lock);
15411541
zynqmp_dp_disp_enable(dp, old_bridge_state);
15421542

15431543
/*
@@ -1598,7 +1598,6 @@ static void zynqmp_dp_bridge_atomic_enable(struct drm_bridge *bridge,
15981598
zynqmp_dp_write(dp, ZYNQMP_DP_SOFTWARE_RESET,
15991599
ZYNQMP_DP_SOFTWARE_RESET_ALL);
16001600
zynqmp_dp_write(dp, ZYNQMP_DP_MAIN_STREAM_ENABLE, 1);
1601-
mutex_unlock(&dp->lock);
16021601
}
16031602

16041603
static void zynqmp_dp_bridge_atomic_disable(struct drm_bridge *bridge,

0 commit comments

Comments
 (0)