Skip to contentSkip to conversation

fs/adfs: bigdir: Fix an error code in adfs_fplus_read()

PATCH New Yang Li 1 participant 1 message May 19, 2021

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 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'

---
 fs/adfs/dir_fplus.c | 1 +
 1 file changed, 1 insertion(+)
fs/adfs/dir_fplus.c +1 -0
index 4a15924..4334279 100644
@@ -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;
 	}
 
Signature · 1 line
1.8.3.1