From: Chengsong Ke
mainline inclusion
from mainline-v5.11-rc1
commit 32f6ccc743b89bb4c51d4a868ffdb6ebda2909cf
category: bugfix
issue: #I4NRS5
CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
Signed-off-by: Yu Changchun
-----------------------------------------------
There is a redundant return in dbg_check_nondata_nodes_order,
which will be never reached. In addition, error code should be
returned instead of zero in this branch.
Signed-off-by: Chengsong Ke
Signed-off-by: Richard Weinberger
Signed-off-by: Zhihao Cheng
Reviewed-by: Zhang Xiaoxu
Signed-off-by: Chen Jun
Signed-off-by: Zheng Zengkai
Signed-off-by: Yu Changchun
---
fs/ubifs/debug.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 1cfc2855673e..e4cd67508b07 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2479,7 +2479,6 @@ int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head)
ubifs_msg(c, "dumping second node");
ubifs_dump_node(c, sb->node);
return -EINVAL;
- return 0;
}
static inline int chance(unsigned int n, unsigned int out_of)
--
2.25.1