Skip to content

Commit 16da399

Browse files
srishanmalexdeucher
authored andcommitted
drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()'
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>
1 parent 97cba23 commit 16da399

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
@@ -915,8 +915,8 @@ static int gmc_v6_0_hw_init(void *handle)
915915

916916
if (amdgpu_emu_mode == 1)
917917
return amdgpu_gmc_vram_checking(adev);
918-
else
919-
return r;
918+
919+
return 0;
920920
}
921921

922922
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
@@ -1099,8 +1099,8 @@ static int gmc_v7_0_hw_init(void *handle)
10991099

11001100
if (amdgpu_emu_mode == 1)
11011101
return amdgpu_gmc_vram_checking(adev);
1102-
else
1103-
return r;
1102+
1103+
return 0;
11041104
}
11051105

11061106
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
@@ -1219,8 +1219,8 @@ static int gmc_v8_0_hw_init(void *handle)
12191219

12201220
if (amdgpu_emu_mode == 1)
12211221
return amdgpu_gmc_vram_checking(adev);
1222-
else
1223-
return r;
1222+
1223+
return 0;
12241224
}
12251225

12261226
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
@@ -2341,8 +2341,8 @@ static int gmc_v9_0_hw_init(void *handle)
23412341

23422342
if (amdgpu_emu_mode == 1)
23432343
return amdgpu_gmc_vram_checking(adev);
2344-
else
2345-
return r;
2344+
2345+
return 0;
23462346
}
23472347

23482348
/**

0 commit comments

Comments
 (0)