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:
parent
7feee249d4
commit
0c7c6a3c05
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user