mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-23 15:26:50 -04:00
Commit28c5bf2876("drm/sched: Disallow initializing entities with no schedulers") failed to notice clearing of entity->rq in drm_sched_entity_init() is now redundant and can be removed. Given that entity->rq can now never be NULL, we also remove two impossible checks, from drm_sched_entity_kill() and drm_sched_entity_flush() respectively. Similarly, we can also remove the !entity->rq check in drm_sched_job_init(). And for the better, given that the error message, if it ever triggered, would have dereferenced the yet un-initialized job-> sched (only initialized later in drm_sched_job_arm()). This appears to have been theoretically broken ever since commit56e449603f("drm/sched: Convert the GPU scheduler to variable number of run-queues") . Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Cc: Christian König <christian.koenig@amd.com> Cc: Danilo Krummrich <dakr@kernel.org> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Philipp Stanner <phasta@kernel.org> Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20260602153339.43453-1-tvrtko.ursulin@igalia.com