]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 28 Feb 2025 19:30:01 +0000 (13:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:44:07 +0000 (09:44 +0200)
commit97a918755a4ca990a372729a4de70d87a31bb93a
treec629f0f5a7448b44f09ba23b87006ff73789d7c0
parent4306dbd7676e41032813620e49cd821a25559852
drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp

[ Upstream commit 6b675ab8efbf2bcee25be29e865455c56e246401 ]

[Why]
Guards automatically release mutex when it goes out of scope making
code easier to follow.

[How]
Replace all use of mutex_lock()/mutex_unlock() with guard(mutex).

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c