X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=lib%2Fpercpu_ida.c;h=beb14839b41ae3c04fd698ec33a34727a2bc92d5;hb=76f4e2da45b44bf70f61c28fcbc91668492463e0;hp=9bbd9c5d375a2c8bf9a6d950ba42ab556c12063b;hpb=7a932516f55cdf430c7cce78df2010ff7db6b874;p=linux-2.6-microblaze.git 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;