mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-13 18:56:59 +02:00
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>
This commit is contained in:
parent
7027b445cc
commit
a7e44898b4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user