diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-12-06 16:12:23 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-01-10 07:18:26 -0500 |
commit | 25f3ff2c445822793d22ac51e3dcb22a694e3cd4 (patch) | |
tree | d1bfa0640d2e94cdefd9d2a83701c2460d326f18 /arch/blackfin/mm/sram-alloc.c | |
parent | a8b19886097032df38bd521cece4bc538fee2266 (diff) |
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/sram-alloc.c')
-rw-r--r-- | arch/blackfin/mm/sram-alloc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c index 627e04b5ba9a..dfd304a4a3ea 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) | |||
704 | { | 704 | { |
705 | struct sram_list_struct *lsl, **tmp; | 705 | struct sram_list_struct *lsl, **tmp; |
706 | struct mm_struct *mm = current->mm; | 706 | struct mm_struct *mm = current->mm; |
707 | int ret = -1; | ||
707 | 708 | ||
708 | for (tmp = &mm->context.sram_list; *tmp; tmp = &(*tmp)->next) | 709 | for (tmp = &mm->context.sram_list; *tmp; tmp = &(*tmp)->next) |
709 | if ((*tmp)->addr == addr) | 710 | if ((*tmp)->addr == addr) { |
710 | goto found; | 711 | lsl = *tmp; |
711 | return -1; | 712 | ret = sram_free(addr); |
712 | found: | 713 | *tmp = lsl->next; |
713 | lsl = *tmp; | 714 | kfree(lsl); |
714 | sram_free(addr); | 715 | break; |
715 | *tmp = lsl->next; | 716 | } |
716 | kfree(lsl); | ||
717 | 717 | ||
718 | return 0; | 718 | return ret; |
719 | } | 719 | } |
720 | EXPORT_SYMBOL(sram_free_with_lsl); | 720 | EXPORT_SYMBOL(sram_free_with_lsl); |
721 | 721 | ||