drm/ttm: remove redundant initialization of variable ret
Subsystems (3)
PATCH 1/1 drm/ttm: remove redundant initialization of variable ret
The variable ret is being initialized with '-ENOMEM' that is meaningless. So remove it.
Signed-off-by Jing Xiangfeng <[email protected]>
--- drivers/gpu/drm/ttm/ttm_tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_tt.c +1 -1
@@ -388,7 +388,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)struct page *from_page;struct page *to_page;int i; -int ret = -ENOMEM ; +int ret;BUG_ON (ttm->state != tt_unbound && ttm->state != tt_unpopulated);BUG_ON (ttm->caching_state != tt_cached);
Signature · 1 line
2.17.1
Am 17.09.20 um 13:42 schrieb Jing Xiangfeng:
Quoted 4 lines
The variable ret is being initialized with '
-ENOMEM' that is meaningless. So remove it.Signed-off-by Jing Xiangfeng <[email protected]>
Stumbled over the same thing just a few days ago, so this is already fixed in my branch.
Quoted 9 lines
--- drivers/gpu/drm/ttm/ttm_tt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_tt.c +0
-0
drivers/gpu/drm/ttm/ttm_tt.c int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) · line 394
Quoted 8 lines
drivers/gpu/drm/ttm/ttm_tt.c +1
-1@@ -388,7 +388,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)struct page *from_page;struct page *to_page;int i; -int ret = -ENOMEM ; +int ret;BUG_ON (ttm->state != tt_unbound && ttm->state != tt_unpopulated);BUG_ON (ttm->caching_state != tt_cached);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel