| From 582c5e08eaf3103b8308f055eb86dabcff1170b6 Mon Sep 17 00:00:00 2001 |
| From: Dan Carpenter <dan.carpenter@oracle.com> |
| Date: Thu, 17 Oct 2019 12:12:16 +0300 |
| Subject: [PATCH] drm/amdgpu/vi: silence an uninitialized variable warning |
| |
| commit 4ff17a1df7d550257972a838220a8af4611c8f2c upstream. |
| |
| Smatch complains that we need to initialized "*cap" otherwise it can |
| lead to an uninitialized variable bug in the caller. This seems like a |
| reasonable warning and it doesn't hurt to silence it at least. |
| |
| drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'. |
| |
| Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP") |
| Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> |
| Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c |
| index bea1587d352d..0e1452f3b559 100644 |
| --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c |
| +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c |
| @@ -1405,6 +1405,7 @@ static int pp_get_asic_baco_capability(void *handle, int *state) |
| { |
| struct pp_hwmgr *hwmgr = handle; |
| |
| + *cap = false; |
| if (!hwmgr) |
| return -EINVAL; |
| |
| -- |
| 2.7.4 |
| |