Commit f9018ac9 authored by Xiaoguang Wang's avatar Xiaoguang Wang Committed by Jens Axboe

block: remove redundant check about 'set->nr_hw_queues' in blk_mq_alloc_tag_set()

At the beginning of blk_mq_alloc_tag_set(), we have already checked whether
'set->nr_hw_queues' is zero, so here remove this redundant check.
Signed-off-by: default avatarXiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 271508db
......@@ -2174,7 +2174,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) {
......
Markdown is supported
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