提交 183cfb57 编写于 作者: W Wei Yongjun 提交者: Jens Axboe

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 d137c830
...@@ -1623,6 +1623,7 @@ static int loop_add(struct loop_device **l, int i) ...@@ -1623,6 +1623,7 @@ static int loop_add(struct loop_device **l, int i)
goto out_free_dev; goto out_free_dev;
i = err; i = err;
err = -ENOMEM;
lo->lo_queue = blk_alloc_queue(GFP_KERNEL); lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
if (!lo->lo_queue) if (!lo->lo_queue)
goto out_free_dev; goto out_free_dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册