ubifs: Remove unreachable code in dbg_check_ltab_lnum
authorKunwu Chan <chentao@kylinos.cn>
Thu, 11 Jan 2024 06:36:56 +0000 (14:36 +0800)
committerRichard Weinberger <richard@nod.at>
Sun, 25 Feb 2024 20:29:30 +0000 (21:29 +0100)
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@kylinos.cn>
Cc: Kunwu Chan <kunwu.chan@hotmail.com>
Suggested-by: Richard Weinberger <richard.weinberger@gmail.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/lpt_commit.c

index c4d0793..07351fd 100644 (file)
@@ -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;