drm/ttm: Drain taskqueue if taskqueue_cancel_timeout() returned an error

Before, this was done if `pending` was true. This is not what the
manpage suggests and not what was done elsewhere in the same file.
This commit is contained in:
Jean-Sébastien Pédron 2015-09-08 19:41:19 +00:00
parent b50756c759
commit 7bead7ac28

View file

@ -789,8 +789,7 @@ int ttm_bo_lock_delayed_workqueue(struct ttm_bo_device *bdev)
{
int pending;
taskqueue_cancel_timeout(taskqueue_thread, &bdev->wq, &pending);
if (pending)
if (taskqueue_cancel_timeout(taskqueue_thread, &bdev->wq, &pending))
taskqueue_drain_timeout(taskqueue_thread, &bdev->wq);
return (pending);
}