[PATCH] blk-mq: cleanup additional nr_hw_queues check

From: hujianyang
Date: Thu Jan 15 2015 - 00:42:31 EST


No need to check set->nr_hw_queues twice in blk_mq_alloc_tag_set(),
remove the latter one.

Signed-off-by: hujianyang <hujianyang@xxxxxxxxxx>
---
block/blk-mq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index a7d4a98..eddeccc 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2097,7 +2097,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
if (set->queue_depth < set->reserved_tags + BLK_MQ_TAG_MIN)
return -EINVAL;

- if (!set->nr_hw_queues || !set->ops->queue_rq || !set->ops->map_queue)
+ if (!set->ops->queue_rq || !set->ops->map_queue)
return -EINVAL;

if (set->queue_depth > BLK_MQ_MAX_DEPTH) {
--
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/