From: Wei Yongjun Date: Fri, 22 Mar 2013 14:59:19 +0000 (-0600) Subject: loop: fix error return code in loop_add() X-Git-Tag: v3.12-rc1~1140^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=183cfb5720dfc393641b87710ce78561af3db6cd;p=kernel%2Fkernel-generic.git loop: fix error return code in loop_add() Fix to return a negative error code from the error handling case, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Jens Axboe --- diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 747bb2a..ee13a82 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1623,6 +1623,7 @@ static int loop_add(struct loop_device **l, int i) goto out_free_dev; i = err; + err = -ENOMEM; lo->lo_queue = blk_alloc_queue(GFP_KERNEL); if (!lo->lo_queue) goto out_free_dev;