Skip to content

Commit

Permalink
drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'
Browse files Browse the repository at this point in the history
[ Upstream commit 16da399 ]

Return 0 for success scenairos in 'gmc_v6/7/8/9_0_hw_init()'

Fixes the below:
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:920 gmc_v6_0_hw_init() warn: missing error code? 'r'
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:1104 gmc_v7_0_hw_init() warn: missing error code? 'r'
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:1224 gmc_v8_0_hw_init() warn: missing error code? 'r'
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:2347 gmc_v9_0_hw_init() warn: missing error code? 'r'

Fixes: fac4ebd ("drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'")
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
srishanm authored and gregkh committed Feb 5, 2024
1 parent 4f89186 commit 7110e98
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
Expand Up @@ -914,8 +914,8 @@ static int gmc_v6_0_hw_init(void *handle)

if (amdgpu_emu_mode == 1)
return amdgpu_gmc_vram_checking(adev);
else
return r;

return 0;
}

static int gmc_v6_0_hw_fini(void *handle)
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
Expand Up @@ -1103,8 +1103,8 @@ static int gmc_v7_0_hw_init(void *handle)

if (amdgpu_emu_mode == 1)
return amdgpu_gmc_vram_checking(adev);
else
return r;

return 0;
}

static int gmc_v7_0_hw_fini(void *handle)
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
Expand Up @@ -1224,8 +1224,8 @@ static int gmc_v8_0_hw_init(void *handle)

if (amdgpu_emu_mode == 1)
return amdgpu_gmc_vram_checking(adev);
else
return r;

return 0;
}

static int gmc_v8_0_hw_fini(void *handle)
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
Expand Up @@ -2373,8 +2373,8 @@ static int gmc_v9_0_hw_init(void *handle)

if (amdgpu_emu_mode == 1)
return amdgpu_gmc_vram_checking(adev);
else
return r;

return 0;
}

/**
Expand Down

0 comments on commit 7110e98

Please sign in to comment.