summaryrefslogtreecommitdiff
path: root/arch/tile
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-07-22 10:33:02 +0300
committerChris Metcalf <cmetcalf@mellanox.com>2017-07-24 11:24:03 -0400
commit637f23abca87d26e091e0d6647ec878d97d2c6cd (patch)
tree8ae6ad5029825a826fd27886abe9a722c14ba290 /arch/tile
parent7c88f2bf7840c0ea67ac2de2e293a653f62ea134 (diff)
tile: array underflow in setup_maxnodemem()
My static checker correctly complains that we should have a lower bound on "node" to prevent an array underflow. Fixes: 867e359b97c9 ("arch/tile: core support for Tilera 32-bit chips.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
index 443a70bccc1c..b1474e7d9afb 100644
--- a/arch/tile/kernel/setup.c
+++ b/arch/tile/kernel/setup.c
@@ -140,7 +140,7 @@ static int __init setup_maxnodemem(char *str)
{
char *endp;
unsigned long long maxnodemem;
- long node;
+ unsigned long node;
node = str ? simple_strtoul(str, &endp, 0) : INT_MAX;
if (node >= MAX_NUMNODES || *endp != ':')