drm/amdgpu: fix ACA bank count boundary check error

fix ACA bank count boundary check error.

Fixes: f5e4cc8461 ("drm/amdgpu: implement RAS ACA driver framework")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Yang Wang 2024-11-06 14:49:56 +08:00 committed by Alex Deucher
parent 6c8d1f4b04
commit 2bb7dced1c

View File

@ -158,7 +158,7 @@ static int aca_smu_get_valid_aca_banks(struct amdgpu_device *adev, enum aca_smu_
return -EINVAL;
}
if (start + count >= max_count)
if (start + count > max_count)
return -EINVAL;
count = min_t(int, count, max_count);