diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-03-22 08:59:19 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-03-22 08:59:19 -0600 |
commit | 183cfb5720dfc393641b87710ce78561af3db6cd (patch) | |
tree | 111d459317c61ba7e12406b942a6eea29f937819 /drivers/block/loop.c | |
parent | d137c8306c748d89260400176613b5a85574b255 (diff) | |
download | blackbird-op-linux-183cfb5720dfc393641b87710ce78561af3db6cd.tar.gz blackbird-op-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>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 1 |
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; |