diff --git a/mm/mempolicy.c b/mm/mempolicy.c index ab51132547b8..4580ca59b9f8 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1390,7 +1390,7 @@ static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask, --maxnode; nodes_clear(*nodes); if (maxnode == 0 || !nmask) - return 0; + return -EINVAL; if (maxnode > PAGE_SIZE*BITS_PER_BYTE) return -EINVAL;