diff options
author | Andrew Goodbody <andrew.goodbody@linaro.org> | 2025-07-04 13:32:42 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-07-11 10:44:29 -0600 |
commit | a7e44898b4d2484a9fd3226f44bc9b51d174f1e3 (patch) | |
tree | 124a4848afe95d40f94837a9900bd81f73c43944 | |
parent | 7027b445cc0bfb86204ecb1f1fe596f5895048d9 (diff) |
fs: ext4fs: Do not negate error before returning it
In ext4fs_readdir it calls ext4fs_read_file and checks the return value
for non-zero to detect an error. This return value should be returned as
is rather than being negated.
This issue found by Smatch
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
-rw-r--r-- | fs/ext4/ext4fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 1727da2dc6d..7fb4c1b755b 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -272,7 +272,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; |