OSDN Git Service

drm/scheduler: Set sched->thread to NULL on failure
authorSharat Masetty <smasetty@codeaurora.org>
Thu, 29 Nov 2018 10:05:19 +0000 (15:35 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Dec 2018 22:56:16 +0000 (17:56 -0500)
commit9afd07566b6c908324cb4072102e2ce96bce986a
tree4f24cc18d4fa7684306aab44c062fb87d76b864f
parent8288b2e5ae01cabd078836618fd651574343cbfc
drm/scheduler: Set sched->thread to NULL on failure

In cases where the scheduler instance is used as a base object of another
driver object, it's not clear if the driver can call scheduler cleanup on the
fail path. So, Set the sched->thread to NULL, so that the driver can safely
call drm_sched_fini() during cleanup.

Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/scheduler/sched_main.c