diff options
author | Christian König <christian.koenig@amd.com> | 2021-04-09 15:58:43 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-04-12 14:42:29 +0300 |
commit | a28e10ed99bcf57cbd55a6146367f7ea752af6be (patch) | |
tree | e41f6b1ddbd77b2a1d5f87452bc11bb515b11776 /drivers/gpu/drm/ttm/ttm_tt.c | |
parent | f4268a4bf1eecb4b38353f6310e561502e04f4dd (diff) | |
download | linux-a28e10ed99bcf57cbd55a6146367f7ea752af6be.tar.xz |
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/ttm_tt.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_tt.c | 2 |
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; } |