drm/amdgpu: fix ACA bank count boundary check error
[ Upstream commit2bb7dced1c] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
65bb123d39
commit
27eaeebd6c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user