summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4fs.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-07-11 10:44:38 -0600
committerTom Rini <trini@konsulko.com>2025-07-11 11:33:25 -0600
commitc29dfc2bb2aed7159b429b210694e2cba17867de (patch)
treeb40676f8fb2e2709e939874c33740c0128c8110a /fs/ext4/ext4fs.c
parentb4528976e72b829e24fc2826944040beb1ba749f (diff)
parent2d6221262ee948b9ae407b51a9bae693348826f5 (diff)
Merge patch series "fs: ext4fs: Fix some issues found by Smatch"
Andrew Goodbody <andrew.goodbody@linaro.org> says: Smatch reported some issues in the ext4fs code. This includes a suggestion to use an unwind goto, to not negate a return value and to ensure that a NULL check happens before the pointer is dereferenced. Link: https://lore.kernel.org/r/20250704-ext4fs_fix-v1-0-5c6acf4bf839@linaro.org
Diffstat (limited to 'fs/ext4/ext4fs.c')
-rw-r--r--fs/ext4/ext4fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 9be99594f50..3c79a889bc2 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -277,7 +277,7 @@ int ext4fs_readdir(struct fs_dir_stream *fs_dirs, struct fs_dirent **dentp)
sizeof(struct ext2_dirent),
(char *)&dirent, &actread);
if (ret < 0)
- return -ret;
+ return ret;
if (!dirent.direntlen)
return -EIO;