summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-22 15:59:19 +0100
committerJens Axboe <axboe@kernel.dk>2013-03-22 15:59:19 +0100
commit183cfb5720dfc393641b87710ce78561af3db6cd (patch)
tree111d459317c61ba7e12406b942a6eea29f937819
parentmtip32xx: fix error return code in mtip_pci_probe() (diff)
downloadlinux-183cfb5720dfc393641b87710ce78561af3db6cd.tar.xz
linux-183cfb5720dfc393641b87710ce78561af3db6cd.zip
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)
goto out_free_dev;
i = err;
+ err = -ENOMEM;
lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
if (!lo->lo_queue)
goto out_free_dev;