projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e698127
)
drm/amd/pm: Fix null pointer dereference issue
author
Jinzhou Su
<jinzhou.su@amd.com>
Wed, 21 Jan 2026 08:42:11 +0000
(16:42 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Wed, 28 Jan 2026 21:21:11 +0000
(16:21 -0500)
If SMU is disabled, during RAS initialization,
there will be null pointer dereference issue here.
Signed-off-by: Jinzhou Su <jinzhou.su@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index
6b6b05e
..
3f70731
100644
(file)
--- a/
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@
-619,6
+619,9
@@
int amdgpu_smu_ras_send_msg(struct amdgpu_device *adev, enum smu_message_type ms
struct smu_context *smu = adev->powerplay.pp_handle;
int ret = -EOPNOTSUPP;
+ if (!smu)
+ return ret;
+
if (smu->ppt_funcs && smu->ppt_funcs->ras_send_msg)
ret = smu->ppt_funcs->ras_send_msg(smu, msg, param, read_arg);