summaryrefslogtreecommitdiff
path: root/lib/percpu_ida.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/percpu_ida.c')
-rw-r--r--lib/percpu_ida.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/percpu_ida.c b/lib/percpu_ida.c
index 9bbd9c5d375a..beb14839b41a 100644
--- a/lib/percpu_ida.c
+++ b/lib/percpu_ida.c
@@ -141,7 +141,7 @@ int percpu_ida_alloc(struct percpu_ida *pool, int state)
spin_lock_irqsave(&tags->lock, flags);
/* Fastpath */
- if (likely(tags->nr_free >= 0)) {
+ if (likely(tags->nr_free)) {
tag = tags->freelist[--tags->nr_free];
spin_unlock_irqrestore(&tags->lock, flags);
return tag;