Commit cb4f9988 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven

m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error

Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent cab49bc9
......@@ -100,7 +100,7 @@ void amiga_chip_free(void *ptr)
if (res->start != start)
continue;
*p = res->sibling;
size = res->end-start;
size = resource_size(res);
pr_debug("amiga_chip_free: free %lu bytes at %p\n", size, ptr);
atomic_add(size, &chipavail);
kfree(res);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment