提交 f54c4442 编写于 作者: Z Zack Rusin 提交者: Roland Scheidegger

drm/vmwgfx: Fix error handling in get_node

ttm_mem_type_manager_func.get_node was changed to return -ENOSPC
instead of setting the node pointer to NULL. Unfortunately
vmwgfx still had two places where it was explicitly converting
-ENOSPC to 0 causing regressions. This fixes those spots by
allowing -ENOSPC to be returned. That seems to fix recent
regressions with vmwgfx.
Signed-off-by: NZack Rusin <zackr@vmware.com>
Reviewed-by: NRoland Scheidegger <sroland@vmware.com>
Reviewed-by: NMartin Krastev <krastevm@vmware.com>
Sigend-off-by: NRoland Scheidegger <sroland@vmware.com>
上级 a1b8638b
......@@ -55,7 +55,7 @@ static int vmw_gmrid_man_get_node(struct ttm_mem_type_manager *man,
id = ida_alloc_max(&gman->gmr_ida, gman->max_gmr_ids - 1, GFP_KERNEL);
if (id < 0)
return (id != -ENOMEM ? 0 : id);
return id;
spin_lock(&gman->lock);
......
......@@ -95,7 +95,7 @@ static int vmw_thp_get_node(struct ttm_mem_type_manager *man,
mem->start = node->start;
}
return 0;
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册