mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
cab49bc95d
commit
cb4f9988f8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user