Skip to contentSkip to conversation

drm/amd/amdgpu: Fix uninitialized variable warnings

PATCH Applied Ma Ke 2 participants 2 messages Jul 18, 2024

Subsystems (3)
lore
Share & tools
lore

Ma Ke

author
#0 lore raw

PATCH v2 1/1 drm/amd/amdgpu: Fix uninitialized variable warnings

Return 0 to avoid returning an uninitialized variable r.

Fixes 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10")

---
Changes in v2:
- added Cc stable line.

---
 drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c +1 -1
index 04c797d54511..0af648931df5 100644
@@ -91,7 +91,7 @@ static int smu_v13_0_10_mode2_suspend_ip(struct amdgpu_device *adev)
 		adev->ip_blocks[i].status.hw = false;
 	}
 
-	return r;
+	return 0;
 }
 
 static int
Signature · 1 line
2.25.1
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 29 lines · Ma Ke

Return 0 to avoid returning an uninitialized variable r.

Fixes 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10")

---
Changes in v2:
- added Cc stable line.

---
 drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c +1 -2
index 04c797d54511..0af648931df5 100644
@@ -91,7 +91,7 @@ static int smu_v13_0_10_mode2_suspend_ip(struct amdgpu_device *adev)
                adev->ip_blocks[i].status.hw = false;
        }
 
-       return r;
+       return 0;
 }
 
 static int
--

2.25.1