Skip to content

Commit

Permalink
m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error
Browse files Browse the repository at this point in the history
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
  • Loading branch information
Geert Uytterhoeven committed Jul 30, 2011
1 parent cab49bc commit cb4f998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/m68k/amiga/chipram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cb4f998

Please sign in to comment.