summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-04-09 14:58:43 +0200
committerChristian König <christian.koenig@amd.com>2021-04-21 15:35:11 +0200
commit8a9d24f222ea1b1c20dffbc62bff736f3f94b768 (patch)
treee90dc78438beba2e44f7c7cb345c01527f0c3cee /drivers/gpu/drm/ttm
parentdrm/bridge: lt8912b: fix incorrect handling of of_* return values (diff)
downloadlinux-8a9d24f222ea1b1c20dffbc62bff736f3f94b768.tar.xz
linux-8a9d24f222ea1b1c20dffbc62bff736f3f94b768.zip
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: Christian König <christian.koenig@amd.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210409130113.1459-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_tt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 7dcd3fb69495..7d479095dcf8 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -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;
}