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
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>
  • Loading branch information
srishanm authored and alexdeucher committed Jan 31, 2024
1 parent 97cba23 commit 16da399
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
Original file line number Diff line number Diff line change
Expand Up @@ -915,8 +915,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
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,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
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,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
Original file line number Diff line number Diff line change
Expand Up @@ -2341,8 +2341,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 16da399

Please sign in to comment.