From: GuoYong Zheng Date: Fri, 17 Jun 2022 10:28:04 +0000 (+0800) Subject: bfq: Remove useless code in bfq_lookup_next_entity X-Git-Tag: for-5.20/block-2022-07-29~156 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=6c77b152f5f1324972cdbdb71e9a6e02d601f49f;p=linux-block.git 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 --- diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index f8eb340381cf..089d07022066 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; }