drm/amdgpu: Fix BUG_ON assert
authorjsg <jsg@openbsd.org>
Mon, 27 Sep 2021 04:11:34 +0000 (04:11 +0000)
committerjsg <jsg@openbsd.org>
Mon, 27 Sep 2021 04:11:34 +0000 (04:11 +0000)
From Andrey Grodzovsky
7b1abace16a9dff6804d4eb94750beb60d9502b4 in linux 5.10.y/5.10.67
ea7acd7c5967542353430947f3faf699e70602e5 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c

index 98202f7..0916100 100644 (file)
@@ -207,7 +207,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
                c++;
        }
 
-       BUG_ON(c >= AMDGPU_BO_MAX_PLACEMENTS);
+       BUG_ON(c > AMDGPU_BO_MAX_PLACEMENTS);
 
        placement->num_placement = c;
        placement->placement = places;