mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
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
This commit is contained in:
parent
5a7bd25992
commit
8a9d24f222
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue