summaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 51bc4bf3f723..ac644fe85589 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3520,8 +3520,8 @@ static ssize_t write_scan_unevictable_node(struct sys_device *dev,
unsigned long res;
unsigned long req = strict_strtoul(buf, 10, &res);
- if (!req)
- return 1; /* zero is no-op */
+ if (req || !res)
+ return 1; /* Invalid input or zero is no-op */
for (zone = node_zones; zone - node_zones < MAX_NR_ZONES; ++zone) {
if (!populated_zone(zone))