From 6c77b152f5f1324972cdbdb71e9a6e02d601f49f Mon Sep 17 00:00:00 2001 From: GuoYong Zheng Date: Fri, 17 Jun 2022 18:28:04 +0800 Subject: [PATCH] bfq: Remove useless code in bfq_lookup_next_entity 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 Link: https://lore.kernel.org/r/1655461684-19075-1-git-send-email-zhenggy@chinatelecom.cn Signed-off-by: Jens Axboe --- block/bfq-wf2q.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index f8eb340..089d070 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -1472,9 +1472,6 @@ static struct bfq_entity *bfq_lookup_next_entity(struct bfq_sched_data *sd, break; } - if (!entity) - return NULL; - return entity; } -- 2.7.4