]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amd/pm: Fix negative array index read
authorJesse Zhang <jesse.zhang@amd.com>
Tue, 30 Apr 2024 02:23:48 +0000 (10:23 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Apr 2024 14:03:56 +0000 (10:03 -0400)
commitc8c19ebf7c0b202a6a2d37a52ca112432723db5f
tree85a3cb7990851a619430e91b3201efda17d091e0
parentf45ed399d7ef464b25c21b7a76c83d3ee11e8d79
drm/amd/pm: Fix negative array index read

Avoid using the negative values
for clk_idex as an index into an array pptable->DpmDescriptor.

V2: fix clk_index return check (Tim Huang)

Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c