drm/amdgpu: Remove else after return statement in 'gmc_v8_0_check_soft_reset'
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Fri, 30 Jun 2023 15:32:50 +0000 (21:02 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Jul 2023 13:02:37 +0000 (09:02 -0400)
Fix below checkpatch warnings:

WARNING: else is not generally useful after a break or return
+               return true;
+       } else {

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c

index 581ed92..21cb97b 100644 (file)
@@ -1319,13 +1319,15 @@ static bool gmc_v8_0_check_soft_reset(void *handle)
                        srbm_soft_reset = REG_SET_FIELD(srbm_soft_reset,
                                                        SRBM_SOFT_RESET, SOFT_RESET_MC, 1);
        }
+
        if (srbm_soft_reset) {
                adev->gmc.srbm_soft_reset = srbm_soft_reset;
                return true;
-       } else {
-               adev->gmc.srbm_soft_reset = 0;
-               return false;
        }
+
+       adev->gmc.srbm_soft_reset = 0;
+
+       return false;
 }
 
 static int gmc_v8_0_pre_soft_reset(void *handle)