提交 25f3ff2c 编写于 作者: M Mike Frysinger

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: NMike Frysinger <vapier@gentoo.org>
上级 a8b19886
...@@ -704,18 +704,18 @@ int sram_free_with_lsl(const void *addr) ...@@ -704,18 +704,18 @@ int sram_free_with_lsl(const void *addr)
{ {
struct sram_list_struct *lsl, **tmp; struct sram_list_struct *lsl, **tmp;
struct mm_struct *mm = current->mm; struct mm_struct *mm = current->mm;
int ret = -1;
for (tmp = &mm->context.sram_list; *tmp; tmp = &(*tmp)->next) for (tmp = &mm->context.sram_list; *tmp; tmp = &(*tmp)->next)
if ((*tmp)->addr == addr) if ((*tmp)->addr == addr) {
goto found; lsl = *tmp;
return -1; ret = sram_free(addr);
found: *tmp = lsl->next;
lsl = *tmp; kfree(lsl);
sram_free(addr); break;
*tmp = lsl->next; }
kfree(lsl);
return 0; return ret;
} }
EXPORT_SYMBOL(sram_free_with_lsl); EXPORT_SYMBOL(sram_free_with_lsl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册