提交 0c7c6a3c 编写于 作者: K Kristoffer Glembo 提交者: David S. Miller

sparc: Fix sbus_alloc_coherent error handling.

Order of kfree and free_pages were swapped in the error handling.
Signed-off-by: NKristoffer Glembo <kristoffer@gaisler.com>
Acked-by: NSam Ravnborg <sam@ravnborg.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7feee249
......@@ -302,9 +302,9 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len,
err_noiommu:
release_resource(res);
err_nova:
free_pages(va, order);
err_nomem:
kfree(res);
err_nomem:
free_pages(va, order);
err_nopages:
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册