bfq: Remove useless code in bfq_lookup_next_entity
authorGuoYong Zheng <zhenggy@chinatelecom.cn>
Fri, 17 Jun 2022 10:28:04 +0000 (18:28 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Jun 2022 12:29:12 +0000 (06:29 -0600)
It is no need to judge entity is null or not here,
directly return entity is ok, so remove it.

Signed-off-by: GuoYong Zheng <zhenggy@chinatelecom.cn>
Link: https://lore.kernel.org/r/1655461684-19075-1-git-send-email-zhenggy@chinatelecom.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-wf2q.c

index f8eb340..089d070 100644 (file)
@@ -1472,9 +1472,6 @@ static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd,
                        break;
        }
 
-       if (!entity)
-               return NULL;
-
        return entity;
 }