Skip to contentSkip to conversation

fs/adfs: dir: fix error return code in adfs_fplus_read()

PATCH New Zhen Lei 1 participant 1 message May 8, 2021

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 fs/adfs: dir: fix error return code in adfs_fplus_read()

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

Fixes d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte")
---
 fs/adfs/dir_fplus.c | 1 +
 1 file changed, 1 insertion(+)
fs/adfs/dir_fplus.c +1 -0
index 4a15924014da..a6fd847ce0eb 100644
@@ -142,6 +142,7 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
 	}
 
 	if (adfs_fplus_checkbyte(dir) != t->bigdircheckbyte) {
+		ret = -EIO;
 		adfs_error(sb, "dir %06x checkbyte mismatch\n", indaddr);
 		goto out;
 	}
Signature · 1 line
2.25.1