Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 183cfb57 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jens Axboe
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d137c830
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;