[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240111063656.68810-1-chentao@kylinos.cn>
Date: Thu, 11 Jan 2024 14:36:56 +0800
From: Kunwu Chan <chentao@...inos.cn>
To: richard@....at,
Artem.Bityutskiy@...ia.com
Cc: linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org,
Kunwu Chan <chentao@...inos.cn>,
Kunwu Chan <kunwu.chan@...mail.com>,
Richard Weinberger <richard.weinberger@...il.com>
Subject: [PATCH v2] ubifs: Remove unreachable code in dbg_check_ltab_lnum
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(-)
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;
--
2.39.2
Powered by blists - more mailing lists