Skip to content

Commit

Permalink
block: remove redundant check about 'set->nr_hw_queues' in blk_mq_all…
Browse files Browse the repository at this point in the history
…oc_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: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Xiaoguang Wang authored and Jens Axboe committed Mar 30, 2015
1 parent 271508d commit f9018ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f9018ac

Please sign in to comment.