summaryrefslogtreecommitdiffstats
path: root/drivers/block/nvme-core.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2015-01-02 15:25:27 +0100
committerJens Axboe <axboe@fb.com>2015-01-02 18:32:02 +0100
commit35b489d32fcc37e8735f41aa794b24cf9d1e74f5 (patch)
treef16c4c7a3148a3ca9c7c149ea6de66fd4423e7c8 /drivers/block/nvme-core.c
parentblock: wake up waiters when a queue is marked dying (diff)
downloadlinux-35b489d32fcc37e8735f41aa794b24cf9d1e74f5.tar.xz
linux-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/nvme-core.c')
-rw-r--r--drivers/block/nvme-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 52d0f2d9fecd..f7d083bb3bd5 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1376,7 +1376,7 @@ static int nvme_alloc_admin_tags(struct nvme_dev *dev)
return -ENOMEM;
dev->admin_q = blk_mq_init_queue(&dev->admin_tagset);
- if (!dev->admin_q) {
+ if (IS_ERR(dev->admin_q)) {
blk_mq_free_tag_set(&dev->admin_tagset);
return -ENOMEM;
}