diff options
author | Ming Lei <ming.lei@canonical.com> | 2015-01-02 14:25:27 +0000 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-02 10:32:02 -0700 |
commit | 35b489d32fcc37e8735f41aa794b24cf9d1e74f5 (patch) | |
tree | f16c4c7a3148a3ca9c7c149ea6de66fd4423e7c8 /drivers/block/null_blk.c | |
parent | aed3ea94bdd2ac0a21ed0103d34097e202ee77f6 (diff) | |
download | linux-stable-35b489d32fcc37e8735f41aa794b24cf9d1e74f5.tar.gz linux-stable-35b489d32fcc37e8735f41aa794b24cf9d1e74f5.tar.bz2 linux-stable-35b489d32fcc37e8735f41aa794b24cf9d1e74f5.zip |
block: fix checking return value of blk_mq_init_queue
Check IS_ERR_OR_NULL(return value) instead of just return value.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Reduced to IS_ERR() by me, we never return NULL.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/null_blk.c')
-rw-r--r-- | drivers/block/null_blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index ae9f615382f6..aa2224aa7caa 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -530,7 +530,7 @@ static int null_add_dev(void) goto out_cleanup_queues; nullb->q = blk_mq_init_queue(&nullb->tag_set); - if (!nullb->q) { + if (IS_ERR(nullb->q)) { rv = -ENOMEM; goto out_cleanup_tags; } |