aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-22 10:59:19 -0400
committerJens Axboe <axboe@kernel.dk>2013-03-22 10:59:19 -0400
commit183cfb5720dfc393641b87710ce78561af3db6cd (patch)
tree111d459317c61ba7e12406b942a6eea29f937819
parentd137c8306c748d89260400176613b5a85574b255 (diff)
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/block/loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 747bb2af69dc..ee13a82f3f5e 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)
1623 goto out_free_dev; 1623 goto out_free_dev;
1624 i = err; 1624 i = err;
1625 1625
1626 err = -ENOMEM;
1626 lo->lo_queue = blk_alloc_queue(GFP_KERNEL); 1627 lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
1627 if (!lo->lo_queue) 1628 if (!lo->lo_queue)
1628 goto out_free_dev; 1629 goto out_free_dev;