summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/numa.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-11-02 16:14:42 +0000
committerPaul Mundt <lethal@linux-sh.org>2009-11-04 11:48:07 +0900
commit9016332014404ae1dca7198f93804ac67ba9e918 (patch)
tree5823e797deb138ba18d1c441910d9781a8b7e561 /arch/sh/mm/numa.c
parentc4b973f532206e1a67b1beae654b44c8be26fc44 (diff)
downloadlinux-9016332014404ae1dca7198f93804ac67ba9e918.tar.bz2
sh: Make sure indexes are positive
The indexes are signed, make sure they are not negative when we read array elements. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/numa.c')
-rw-r--r--arch/sh/mm/numa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/mm/numa.c b/arch/sh/mm/numa.c
index 9b784fdb947c..6c524446c0f6 100644
--- a/arch/sh/mm/numa.c
+++ b/arch/sh/mm/numa.c
@@ -60,7 +60,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
unsigned long bootmem_paddr;
/* Don't allow bogus node assignment */
- BUG_ON(nid > MAX_NUMNODES || nid == 0);
+ BUG_ON(nid > MAX_NUMNODES || nid <= 0);
start_pfn = start >> PAGE_SHIFT;
end_pfn = end >> PAGE_SHIFT;