[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1306005500-29259-5-git-send-email-geert@linux-m68k.org>
Date:	Sat, 21 May 2011 21:18:20 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	linux-m68k@...ts.linux-m68k.org
Cc:	linux-kernel@...r.kernel.org,
	Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 5/5] m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
 arch/m68k/amiga/chipram.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index c3fe451..cfd3b7a 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -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);
-- 
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
