]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - lib/idr.c
Input: acecad - drop unneeded cast and couple unneeded spaces.
[linux-2.6-omap-h63xx.git] / lib / idr.c
index 81fc430602ee8f4c2b4e336a606813ad54b0e5b2..c5be889de449555dc31b5c5d50a061f34187fdb6 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -175,7 +175,7 @@ build_up:
         * Add a new layer to the top of the tree if the requested
         * id is larger than the currently allocated space.
         */
-       while ((layers < MAX_LEVEL) && (id >= (1 << (layers*IDR_BITS)))) {
+       while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
                layers++;
                if (!p->count)
                        continue;