BUG_ON() should not be used anymore since it crashes the entire kernel.
Its remaining usage is in drm_sched_job_arm() to check the entity
pointer. If that pointer is NULL, however, the problem will become
visible through a respective NULL pointer exception anyways.

There is no advantage in crashing the kernel as a whole.

Remove the BUG_ON().

Signed-off-by: Philipp Stanner <[email protected]>
---
 drivers/gpu/drm/scheduler/sched_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/scheduler/sched_main.c 
b/drivers/gpu/drm/scheduler/sched_main.c
index d2ca01b31ee4..4e1b6e79ae19 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -637,7 +637,6 @@ void drm_sched_job_arm(struct drm_sched_job *job)
        struct drm_gpu_scheduler *sched;
        struct drm_sched_entity *entity = job->entity;
 
-       BUG_ON(!entity);
        drm_sched_entity_select_rq(entity);
        sched = container_of(entity->rq, typeof(*sched), rq);
 
-- 
2.54.0

Reply via email to