diff mbox series

[v2] drm/amd/amdgpu: Fix uninitialized variable warnings

Message ID 20240718141735.884347-1-make24@iscas.ac.cn (mailing list archive)
State New, archived
Headers show
Series [v2] drm/amd/amdgpu: Fix uninitialized variable warnings | expand

Commit Message

Ma Ke July 18, 2024, 2:17 p.m. UTC
Return 0 to avoid returning an uninitialized variable r.

Cc: stable@vger.kernel.org
Fixes: 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
---
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(-)

Comments

Alex Deucher July 18, 2024, 3:22 p.m. UTC | #1
Applied.  Thanks!

Alex

On Thu, Jul 18, 2024 at 10:17 AM Ma Ke <make24@iscas.ac.cn> wrote:
>
> Return 0 to avoid returning an uninitialized variable r.
>
> Cc: stable@vger.kernel.org
> Fixes: 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10")
> Signed-off-by: Ma Ke <make24@iscas.ac.cn>
> ---
> 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(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c b/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
> index 04c797d54511..0af648931df5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
> +++ b/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
> @@ -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
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c b/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
index 04c797d54511..0af648931df5 100644
--- a/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
+++ b/drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c
@@ -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