summaryrefslogtreecommitdiff
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-22 18:59:19 +0400
committerJens Axboe <axboe@kernel.dk>2013-03-22 18:59:19 +0400
commit183cfb5720dfc393641b87710ce78561af3db6cd (patch)
tree111d459317c61ba7e12406b942a6eea29f937819 /drivers/block/loop.c
parentd137c8306c748d89260400176613b5a85574b255 (diff)
downloadlinux-183cfb5720dfc393641b87710ce78561af3db6cd.tar.xz
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>
Diffstat (limited to 'drivers/block/loop.c')
-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)
goto out_free_dev;
i = err;
+ err = -ENOMEM;
lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
if (!lo->lo_queue)
goto out_free_dev;