diff options
author | Kristoffer Glembo <kristoffer@gaisler.com> | 2011-01-17 23:10:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:18:59 -0400 |
commit | 0c7c6a3c05f1d6d7e99fff0ca4056dce3ce07484 (patch) | |
tree | a3cbb0512c6c069fe8347810eea0ad4ac27f0b0d /arch/sparc | |
parent | 7feee249d47f950a19ca142660ee41fe27b04b27 (diff) |
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>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index bd4fb10748b1..c6ce9a6a4790 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -302,9 +302,9 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len, | |||
302 | err_noiommu: | 302 | err_noiommu: |
303 | release_resource(res); | 303 | release_resource(res); |
304 | err_nova: | 304 | err_nova: |
305 | free_pages(va, order); | ||
306 | err_nomem: | ||
307 | kfree(res); | 305 | kfree(res); |
306 | err_nomem: | ||
307 | free_pages(va, order); | ||
308 | err_nopages: | 308 | err_nopages: |
309 | return NULL; | 309 | return NULL; |
310 | } | 310 | } |