artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b9e26d
)
drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init
author
jsg
<jsg@openbsd.org>
Mon, 29 Jan 2024 01:51:19 +0000
(
01:51
+0000)
committer
jsg
<jsg@openbsd.org>
Mon, 29 Jan 2024 01:51:19 +0000
(
01:51
+0000)
From Zhipeng Lu
ae7cbf935b9a1b41f65fe6443e7cd0c401500b20
in linux-6.6.y/6.6.14
2f3be3ca779b11c332441b10e00443a2510f4d7b
in mainline linux
sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
b/sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
index
120354c
..
6fabd1e
100644
(file)
--- a/
sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
+++ b/
sys/dev/pci/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
@@
-2974,6
+2974,8
@@
static int smu7_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
result = smu7_get_evv_voltages(hwmgr);
if (result) {
pr_info("Get EVV Voltage Failed. Abort Driver loading!\n");
+ kfree(hwmgr->backend);
+ hwmgr->backend = NULL;
return -EINVAL;
}
} else {
@@
-3019,8
+3021,10
@@
static int smu7_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
}
result = smu7_update_edc_leakage_table(hwmgr);
- if (result)
+ if (result) {
+ smu7_hwmgr_backend_fini(hwmgr);
return result;
+ }
return 0;
}