[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <920ffa51-15af-c07f-3eae-1e1ebd5fdd33@huawei.com>
Date: Thu, 11 Jan 2024 20:30:14 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: Kunwu Chan <chentao@...inos.cn>, <richard@....at>,
<Artem.Bityutskiy@...ia.com>
CC: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>, Kunwu
Chan <kunwu.chan@...mail.com>, Richard Weinberger
<richard.weinberger@...il.com>
Subject: Re: [PATCH v2] ubifs: Remove unreachable code in dbg_check_ltab_lnum
在 2024/1/11 14:36, Kunwu Chan 写道:
> Because there is no break statement in the dead loop above,it is
> impossible to execute the 'err=0' statement.Delete the code that
> will never execute.
>
> Fixes: 6fb324a4b0c3 ("UBIFS: allocate ltab checking buffer on demand")
> Signed-off-by: Kunwu Chan <chentao@...inos.cn>
> Cc: Kunwu Chan <kunwu.chan@...mail.com>
> Suggested-by: Richard Weinberger <richard.weinberger@...il.com>
>
> ---
> v2: Remove the initialization of err
> ---
> fs/ubifs/lpt_commit.c | 1 -
> 1 file changed, 1 deletion(-)
Reviewed-by: Zhihao Cheng <chengzhihao1@...wei.com>
>
> diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
> index c4d079328b92..07351fdce722 100644
> --- a/fs/ubifs/lpt_commit.c
> +++ b/fs/ubifs/lpt_commit.c
> @@ -1646,7 +1646,6 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum)
> len -= node_len;
> }
>
> - err = 0;
> out:
> vfree(buf);
> return err;
>
Powered by blists - more mailing lists