diff options
| author | Yang Wang <[email protected]> | 2024-11-06 06:49:56 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-11-08 16:08:38 +0000 |
| commit | 2bb7dced1c2f8c0e705cc74840f776406db492c3 (patch) | |
| tree | 5988b8c09a938482da9fd96c5d6f3fdcac9fab98 /drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | |
| parent | drm/amdgpu: Add sysfs interface for gc reset mask (diff) | |
| download | kernel-2bb7dced1c2f8c0e705cc74840f776406db492c3.tar.gz kernel-2bb7dced1c2f8c0e705cc74840f776406db492c3.zip | |
drm/amdgpu: fix ACA bank count boundary check error
fix ACA bank count boundary check error.
Fixes: f5e4cc8461c4 ("drm/amdgpu: implement RAS ACA driver framework")
Signed-off-by: Yang Wang <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c index 2ca127173135..9d6345146495 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c @@ -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); |
