artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23993bc
)
drm/amd/pm: ensure the fw_info is not null before using it
author
jsg
<jsg@openbsd.org>
Fri, 11 Oct 2024 02:42:47 +0000
(
02:42
+0000)
committer
jsg
<jsg@openbsd.org>
Fri, 11 Oct 2024 02:42:47 +0000
(
02:42
+0000)
From Tim Huang
b511474f49588cdca355ebfce54e7eddbf7b75a5
in linux-6.6.y/6.6.55
186fb12e7a7b038c2710ceb2fb74068f1b5d55a4
in mainline linux
sys/dev/pci/drm/amd/pm/powerplay/hwmgr/processpptables.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/processpptables.c
b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/processpptables.c
index
5794b64
..
56a2257
100644
(file)
--- a/
sys/dev/pci/drm/amd/pm/powerplay/hwmgr/processpptables.c
+++ b/
sys/dev/pci/drm/amd/pm/powerplay/hwmgr/processpptables.c
@@
-1185,6
+1185,8
@@
static int init_overdrive_limits(struct pp_hwmgr *hwmgr,
fw_info = smu_atom_get_data_table(hwmgr->adev,
GetIndexIntoMasterTable(DATA, FirmwareInfo),
&size, &frev, &crev);
+ PP_ASSERT_WITH_CODE(fw_info != NULL,
+ "Missing firmware info!", return -EINVAL);
if ((fw_info->ucTableFormatRevision == 1)
&& (le16_to_cpu(fw_info->usStructureSize) >= sizeof(ATOM_FIRMWARE_INFO_V1_4)))