Whamcloud - gitweb
libext2fs: fix incorrect negative error return in ext2fs_rw_bitmaps()
authorTheodore Ts'o <tytso@mit.edu>
Thu, 21 Jan 2021 20:20:45 +0000 (15:20 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 21 Jan 2021 20:20:45 +0000 (15:20 -0500)
Fixes: e2e58d312804 ("ext2fs: parallel bitmap loading")
Fixes-Coverity-Bug: 147255
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/rw_bitmaps.c

index 7e4f7c6..e3be4b8 100644 (file)
@@ -576,7 +576,7 @@ errcode_t ext2fs_rw_bitmaps(ext2_filsys fs, int flags, int num_threads)
 
        thread_ids = calloc(sizeof(pthread_t), num_threads);
        if (!thread_ids)
-               return -ENOMEM;
+               return ENOMEM;
 
        thread_infos = calloc(sizeof(struct read_bitmaps_thread_info),
                                num_threads);