PM / hibernate: Fix rtree_next_node() to avoid walking off list ends
[linux-2.6-block.git] / kernel / pid.c
index 4d73a834c7e6590e29eb0d1a71645caf6c274016..f66162f2359bfb2e85777ce4c5faed637a15db60 100644 (file)
@@ -311,7 +311,7 @@ struct pid *alloc_pid(struct pid_namespace *ns)
        pid->level = ns->level;
        for (i = ns->level; i >= 0; i--) {
                nr = alloc_pidmap(tmp);
-               if (IS_ERR_VALUE(nr)) {
+               if (nr < 0) {
                        retval = nr;
                        goto out_free;
                }