Skip to content

Commit

Permalink
Blackfin: sram_free_with_lsl: do not ignore return value of sram_free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger committed Jan 10, 2011
1 parent a8b1988 commit 25f3ff2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions arch/blackfin/mm/sram-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 25f3ff2

Please sign in to comment.