drm/amd/display: Use _free() macro for amdgpu_dm_commit_zero_streams()
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 18 Feb 2025 04:58:31 +0000 (22:58 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Mar 2025 15:41:25 +0000 (10:41 -0500)
commite3bc320c4b0e1c2f45d00b917c27e474c90dcd9f
treeaa089bf527deea1ae0f23ea913cd8a2c1e2bd00b
parent3cf7a0bc87f028b6bc63a43a80d9d6026ae4d85f
drm/amd/display: Use _free() macro for amdgpu_dm_commit_zero_streams()

All cases except a failure to create a copy of the current context will
call dc_state_release() on the copied context.

Use a _free() macro to free the context and then adjust the error handling
flow to drop the unnecessary use of goto statements.

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c