Fix the potential memleak since scheduler main thread always
hold one last_sched fence.
Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
else if (r)
DRM_ERROR("fence add callback failed (%d)\n", r);
}
-
- dma_fence_put(entity->last_scheduled);
- entity->last_scheduled = NULL;
}
+
+ dma_fence_put(entity->last_scheduled);
+ entity->last_scheduled = NULL;
}
EXPORT_SYMBOL(drm_sched_entity_cleanup);