Skip to content

Commit f9018ac

Browse files
wangxiaoguangaxboe
authored andcommitted
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: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent 271508d commit f9018ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
21742174
if (set->queue_depth < set->reserved_tags + BLK_MQ_TAG_MIN)
21752175
return -EINVAL;
21762176

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

21802180
if (set->queue_depth > BLK_MQ_MAX_DEPTH) {

0 commit comments

Comments
 (0)