[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1621419483-9339-1-git-send-email-yang.lee@linux.alibaba.com>
Date: Wed, 19 May 2021 18:18:03 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: rmk+kernel@...linux.org.uk
Cc: linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH] fs/adfs: bigdir: Fix an error code in adfs_fplus_read()
This code accidentally returns 0, but it should return the
-EIO error code to show a I/O error.
Clean up smatch warning:
fs/adfs/dir_fplus.c:146 adfs_fplus_read() warn: missing error code 'ret'
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
fs/adfs/dir_fplus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index 4a15924..4334279 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -143,6 +143,7 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
if (adfs_fplus_checkbyte(dir) != t->bigdircheckbyte) {
adfs_error(sb, "dir %06x checkbyte mismatch\n", indaddr);
+ ret = -EIO;
goto out;
}
--
1.8.3.1
Powered by blists - more mailing lists