summaryrefslogtreecommitdiff
path: root/arch/blackfin/mm
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-12-06 21:12:23 (GMT)
committerMike Frysinger <vapier@gentoo.org>2011-01-10 12:18:26 (GMT)
commit25f3ff2c445822793d22ac51e3dcb22a694e3cd4 (patch)
treed1bfa0640d2e94cdefd9d2a83701c2460d326f18 /arch/blackfin/mm
parenta8b19886097032df38bd521cece4bc538fee2266 (diff)
downloadlinux-25f3ff2c445822793d22ac51e3dcb22a694e3cd4.tar.xz
Blackfin: sram_free_with_lsl: do not ignore return value of sram_free
If there was an error in the lower free functions, we need to pass that back up so the calling process is able to check things. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mm')
-rw-r--r--arch/blackfin/mm/sram-alloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c
index 627e04b..dfd304a 100644
--- a/arch/blackfin/mm/sram-alloc.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -704,18 +704,18 @@ int sram_free_with_lsl(const void *addr)
{
struct sram_list_struct *lsl, **tmp;
struct mm_struct *mm = current->mm;
+ int ret = -1;
for (tmp = &mm->context.sram_list; *tmp; tmp = &(*tmp)->next)
- if ((*tmp)->addr == addr)
- goto found;
- return -1;
-found:
- lsl = *tmp;
- sram_free(addr);
- *tmp = lsl->next;
- kfree(lsl);
+ if ((*tmp)->addr == addr) {
+ lsl = *tmp;
+ ret = sram_free(addr);
+ *tmp = lsl->next;
+ kfree(lsl);
+ break;
+ }
- return 0;
+ return ret;
}
EXPORT_SYMBOL(sram_free_with_lsl);