Skip to content

Commit 7110e98

Browse files
srishanmgregkh
authored andcommitted
drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'
[ 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>
1 parent 4f89186 commit 7110e98

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,8 +914,8 @@ static int gmc_v6_0_hw_init(void *handle)
914914

915915
if (amdgpu_emu_mode == 1)
916916
return amdgpu_gmc_vram_checking(adev);
917-
else
918-
return r;
917+
918+
return 0;
919919
}
920920

921921
static int gmc_v6_0_hw_fini(void *handle)

drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,8 @@ static int gmc_v7_0_hw_init(void *handle)
11031103

11041104
if (amdgpu_emu_mode == 1)
11051105
return amdgpu_gmc_vram_checking(adev);
1106-
else
1107-
return r;
1106+
1107+
return 0;
11081108
}
11091109

11101110
static int gmc_v7_0_hw_fini(void *handle)

drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,8 +1224,8 @@ static int gmc_v8_0_hw_init(void *handle)
12241224

12251225
if (amdgpu_emu_mode == 1)
12261226
return amdgpu_gmc_vram_checking(adev);
1227-
else
1228-
return r;
1227+
1228+
return 0;
12291229
}
12301230

12311231
static int gmc_v8_0_hw_fini(void *handle)

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,8 +2373,8 @@ static int gmc_v9_0_hw_init(void *handle)
23732373

23742374
if (amdgpu_emu_mode == 1)
23752375
return amdgpu_gmc_vram_checking(adev);
2376-
else
2377-
return r;
2376+
2377+
return 0;
23782378
}
23792379

23802380
/**

0 commit comments

Comments
 (0)