]> git.hungrycats.org Git - linux/commit
drm/amd/pm: use kcalloc in phm table copy helpers
authorCandice Li <candice.li@amd.com>
Wed, 20 May 2026 04:14:37 +0000 (12:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 17:53:03 +0000 (13:53 -0400)
commit05465e2a13f138258a0c77116fd8fd9f2f41952e
tree2f89a9482538346b3947d1502e1b99d0acd29167
parent66a856e3e5d92a09363dea37e9376921b30aaa6b
drm/amd/pm: use kcalloc in phm table copy helpers

Use kcalloc() so multiplication overflow is detected
and allocation fails safely for phm table copy helpers.

Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c