Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {