]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amd/display: Drop `ret` variable from dm_suspend()
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 18 Feb 2025 04:58:29 +0000 (22:58 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Mar 2025 15:41:17 +0000 (10:41 -0500)
The `ret` variable in dm_suspend() doesn't get set and is just used
to return 0.  Drop the needless declaration.

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

index d0af935557c43b9af46ea18d62ce0ef065e9560c..c0887693f7d00a5dab7393e6e7b2f453d574cd4f 100644 (file)
@@ -3145,7 +3145,6 @@ static int dm_suspend(struct amdgpu_ip_block *ip_block)
 {
        struct amdgpu_device *adev = ip_block->adev;
        struct amdgpu_display_manager *dm = &adev->dm;
-       int ret = 0;
 
        if (amdgpu_in_reset(adev)) {
                mutex_lock(&dm->dc_lock);
@@ -3163,7 +3162,7 @@ static int dm_suspend(struct amdgpu_ip_block *ip_block)
 
                hpd_rx_irq_work_suspend(dm);
 
-               return ret;
+               return 0;
        }
 
        WARN_ON(adev->dm.cached_state);