sparc: Fix sbus_alloc_coherent error handling.

Order of kfree and free_pages were swapped in the error handling.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Kristoffer Glembo 2011-01-18 04:10:29 +00:00 committed by David S. Miller
parent 7feee249d4
commit 0c7c6a3c05

View File

@ -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;
}