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)
commit9b66d6600e6a060333712c54af90631eb6276d93
tree918b38217716f25a9f04f8a2557a6caf5bd1be04
parent4c0d0bcb224f968510aff5eddef2b294e5aa4b8b
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: 8264ee69f0d8 ("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