Commit 0c7c6a3c authored by Kristoffer Glembo's avatar Kristoffer Glembo Committed by 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: default avatarKristoffer Glembo <kristoffer@gaisler.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment