From: Theodore Ts'o Date: Fri, 12 Feb 2021 20:10:11 +0000 (-0500) Subject: libext2fs: fix incorrect error code return in ext2fs_add_jounral_inode3() X-Git-Tag: v1.46.2~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b25ea248c2335d39968b770a95dda4eae6b6fa4;p=thirdparty%2Fe2fsprogs.git libext2fs: fix incorrect error code return in ext2fs_add_jounral_inode3() Addresses-Coverity-Bug: 1472255 Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/mkjournal.c b/lib/ext2fs/mkjournal.c index 732ba7d6f..bc8c57bff 100644 --- a/lib/ext2fs/mkjournal.c +++ b/lib/ext2fs/mkjournal.c @@ -524,7 +524,7 @@ errcode_t ext2fs_add_journal_inode3(ext2_filsys fs, struct ext2fs_journal_params retval = ioctl(fd, EXT2_IOC_SETFLAGS, &f); close(fd); if (retval) - return retval; + return errno; } #endif #endif