aboutsummaryrefslogtreecommitdiffstats
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)
141 spin_lock_irqsave(&tags->lock, flags); 141 spin_lock_irqsave(&tags->lock, flags);
142 142
143 /* Fastpath */ 143 /* Fastpath */
144 if (likely(tags->nr_free >= 0)) { 144 if (likely(tags->nr_free)) {
145 tag = tags->freelist[--tags->nr_free]; 145 tag = tags->freelist[--tags->nr_free];
146 spin_unlock_irqrestore(&tags->lock, flags); 146 spin_unlock_irqrestore(&tags->lock, flags);
147 return tag; 147 return tag;