[PATCH] drm/admgpu: fix the page fault caused by uninitialized variables
Wang, Yang(Kevin)
KevinYang.Wang at amd.com
Thu Jan 20 08:42:21 UTC 2022
[AMD Official Use Only]
Reviewed-by: Yang Wang <kevinyang.wang at amd.com>
Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Xiaojian Du <Xiaojian.Du at amd.com>
Sent: Thursday, January 20, 2022 4:02 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Huang, Ray <Ray.Huang at amd.com>; Du, Xiaojian <Xiaojian.Du at amd.com>
Subject: [PATCH] drm/admgpu: fix the page fault caused by uninitialized variables
This patch will fix the page fault caused by uninitialized variables.
Signed-off-by: Xiaojian Du <Xiaojian.Du at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index c65d82301bca..09780a0f874a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -828,9 +828,9 @@ void amdgpu_gmc_get_reserved_allocation(struct amdgpu_device *adev)
int amdgpu_gmc_vram_checking(struct amdgpu_device *adev)
{
- struct amdgpu_bo *vram_bo;
- uint64_t vram_gpu;
- void *vram_ptr;
+ struct amdgpu_bo *vram_bo = NULL;
+ uint64_t vram_gpu = 0;
+ void *vram_ptr = NULL;
int ret, size = 0x100000;
uint8_t cptr[10];
--
2.17.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20220120/f57c5d2b/attachment.htm>
More information about the amd-gfx
mailing list