Commit 8a9d24f2 authored by Christian König's avatar Christian König
Browse files

drm/ttm: fix return value check



The function returns the number of swapped pages here. Only abort when we get
a negative error code.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210409130113.1459-1-christian.koenig@amd.com
parent 5a7bd259
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ int ttm_tt_populate(struct ttm_device *bdev,
	       ttm_dma32_pages_limit) {

		ret = ttm_global_swapout(ctx, GFP_KERNEL);
		if (ret)
		if (ret < 0)
			goto error;
	}