Skip to content
Commit 38a3499f authored by Chengguang Xu's avatar Chengguang Xu Committed by Jens Axboe
Browse files

block: loop: check error using IS_ERR instead of IS_ERR_OR_NULL in loop_add()



blk_mq_init_queue() will not return NULL pointer to its caller,
so it's better to replace IS_ERR_OR_NULL using IS_ERR in loop_add().

If in the future things change to check NULL pointer inside loop_add(),
we should return -ENOMEM as return code instead of PTR_ERR(NULL).

Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e7cc005f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment