blk: fix wrong idr_pre_get() error check in loop.c
authorSilva Paulo <psdasilva@yahoo.com>
Sat, 14 Jul 2012 22:39:58 +0000 (15:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Jul 2012 22:39:58 +0000 (15:39 -0700)
commit68d740d79c4977a1a2197c6e68c618c8320c8ace
tree4903c072a0a4ea06fc52a744b431ba3427e8b8f1
parent1daaa5e4ff2f09af58f9f7425bbd02e28f125d8e
blk: fix wrong idr_pre_get() error check in loop.c

The idr_pre_get() function never returns a value < 0.  It returns 0 (no
memory) or 1 (OK).

Reported-by: Silva Paulo <psdasilva@yahoo.com>
[ Rewrote Silva's patch, but attributing it to Silva anyway  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/loop.c