aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2011-04-27 04:28:19 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2011-07-30 15:21:38 -0400
commitcb4f9988f86746fff3183d31381deb2b2a421a3a (patch)
tree5ab7a43422ef23570a35ab478119db86b481f217 /arch/m68k
parentcab49bc95d848a85d7108f896f6d21283f25f54c (diff)
m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/amiga/chipram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index c3fe45125f52..cfd3b7af26c6 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -100,7 +100,7 @@ void amiga_chip_free(void *ptr)
100 if (res->start != start) 100 if (res->start != start)
101 continue; 101 continue;
102 *p = res->sibling; 102 *p = res->sibling;
103 size = res->end-start; 103 size = resource_size(res);
104 pr_debug("amiga_chip_free: free %lu bytes at %p\n", size, ptr); 104 pr_debug("amiga_chip_free: free %lu bytes at %p\n", size, ptr);
105 atomic_add(size, &chipavail); 105 atomic_add(size, &chipavail);
106 kfree(res); 106 kfree(res);