]> 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:41:46 +0000 (09:41 +0200)
commit942ecb9e8f8544796ac8041895028b0c4d0f7b51
tree7461606b3762a9273fd8b297184f1290c6b29bf4
parente07ed98515836fbbdc88df85c9618d9f67a74226
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