]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/powerplay: off by one bugs in smu_cmn_to_asic_specific_index()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 27 Jul 2020 13:39:40 +0000 (16:39 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Jul 2020 20:45:35 +0000 (16:45 -0400)
commitc695f986f53fdb76c6ae372fc9a7e6556b6e855e
tree918b38217716f25a9f04f8a2557a6caf5bd1be04
parentfa8a91df94d5d0c2e23334f95475e0a925e344b3
drm/amd/powerplay: off by one bugs in smu_cmn_to_asic_specific_index()

These tables have _COUNT number of elements so the comparisons should be
>= instead of > to prevent reading one element beyond the end of the
array.

Fixes: f5100ad91fe0 ("drm/amd/powerplay: drop unused code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smu_cmn.c