Thread (63 messages) 63 messages, 1 author, 2021-07-10

[PATCH AUTOSEL 5.4 19/63] fs/jfs: Fix missing error code in lmLogInit()

From: Sasha Levin <sashal@kernel.org>
Date: 2021-07-10 02:32:47
Also in: lkml
Subsystem: filesystems (vfs and infrastructure), jfs filesystem, the rest · Maintainers: Alexander Viro, Christian Brauner, Dave Kleikamp, Linus Torvalds

From: Jiapeng Chong <redacted>

[ Upstream commit 492109333c29e1bb16d8732e1d597b02e8e0bf2e ]

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'rc.

Eliminate the follow smatch warning:

fs/jfs/jfs_logmgr.c:1327 lmLogInit() warn: missing error code 'rc'.

Reported-by: Abaci Robot <redacted>
Signed-off-by: Jiapeng Chong <redacted>
Signed-off-by: Dave Kleikamp <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/jfs/jfs_logmgr.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 9330eff210e0..78fd136ac13b 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1324,6 +1324,7 @@ int lmLogInit(struct jfs_log * log)
 		} else {
 			if (!uuid_equal(&logsuper->uuid, &log->uuid)) {
 				jfs_warn("wrong uuid on JFS log device");
+				rc = -EINVAL;
 				goto errout20;
 			}
 			log->size = le32_to_cpu(logsuper->size);
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help