This fixes the warning below
error: ‘ret’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
int xgmi_tx_link, ret;
^~~
Signed-off-by: Bhawanpreet Lakha <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
index 201c00411720..a8442508eea5 100644
--- a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
+++ b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
@@ -459,7 +459,7 @@ static int df_v3_6_stop_xgmi_link_cntr(struct amdgpu_device
*adev,
static int df_v3_6_pmc_start(struct amdgpu_device *adev, uint64_t config,
int is_enable)
{
- int xgmi_tx_link, ret;
+ int xgmi_tx_link, ret = 0;
switch (adev->asic_type) {
case CHIP_VEGA20:
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx