projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9716ebc
)
drm/amd/powerplay: fix potential issue of array access violation
author
Rex Zhu
<
[email protected]
>
Wed, 14 Sep 2016 11:24:25 +0000
(19:24 +0800)
committer
Alex Deucher
<
[email protected]
>
Mon, 19 Sep 2016 17:22:08 +0000
(13:22 -0400)
Signed-off-by: Rex Zhu <
[email protected]
>
Reviewed-by: Alex Deucher <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 524d0dd4f0e9fd13bc0976977d2980facb847b49..4f82a06ba3e2f834c937f0e5778bda2b05859923 100644
(file)
--- a/
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
+++ b/
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
@@
-388,12
+388,9
@@
int phm_reset_single_dpm_table(void *table,
struct vi_dpm_table *dpm_table = (struct vi_dpm_table *)table;
- PP_ASSERT_WITH_CODE(count <= max,
- "Fatal error, can not set up single DPM table entries to exceed max number!",
- );
+ dpm_table->count = count > max ? max : count;
- dpm_table->count = count;
- for (i = 0; i < max; i++)
+ for (i = 0; i < dpm_table->count; i++)
dpm_table->dpm_level[i].enabled = false;
return 0;