]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fs/jfs: Fix missing error code in lmLogInit()
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Tue, 1 Jun 2021 11:07:10 +0000 (19:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:21:11 +0000 (16:21 +0200)
[ 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 <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/jfs/jfs_logmgr.c

index a21ea8b3e5fa6762c80247137f332e3d3a651be1..12555c4eeb2b672eea39b6056ac491724993dd8f 100644 (file)
@@ -1338,6 +1338,7 @@ int lmLogInit(struct jfs_log * log)
                } else {
                        if (memcmp(logsuper->uuid, log->uuid, 16)) {
                                jfs_warn("wrong uuid on JFS log device");
+                               rc = -EINVAL;
                                goto errout20;
                        }
                        log->size = le32_to_cpu(logsuper->size);