Skip to content

Commit a28e10e

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: Christian König <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f4268a4 commit a28e10e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/ttm/ttm_tt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ int ttm_tt_populate(struct ttm_device *bdev,
326326
ttm_dma32_pages_limit) {
327327

328328
ret = ttm_global_swapout(ctx, GFP_KERNEL);
329-
if (ret)
329+
if (ret < 0)
330330
goto error;
331331
}
332332

0 commit comments

Comments
 (0)