fs-udf: Delete an error message for a failed memory allocation in two functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 15 Aug 2017 14:14:19 +0000 (16:14 +0200)
committerJan Kara <jack@suse.cz>
Wed, 16 Aug 2017 14:43:23 +0000 (16:43 +0200)
Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/inode.c
fs/udf/super.c

index 2bdb68215771cf70b830584607b65a2fa021e6e6..8dacf4f574149038909fc12abe02580bd2eab71e 100644 (file)
@@ -1572,13 +1572,8 @@ static int udf_alloc_i_data(struct inode *inode, size_t size)
 {
        struct udf_inode_info *iinfo = UDF_I(inode);
        iinfo->i_ext.i_data = kmalloc(size, GFP_KERNEL);
-
-       if (!iinfo->i_ext.i_data) {
-               udf_err(inode->i_sb, "(ino %ld) no free memory\n",
-                       inode->i_ino);
+       if (!iinfo->i_ext.i_data)
                return -ENOMEM;
-       }
-
        return 0;
 }
 
index d772c9c676d0a284757680b249c391b1f99d7cf6..93c59630512b2d7e074278f0478542d69c193bb9 100644 (file)
@@ -268,8 +268,6 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count)
 
        sbi->s_partmaps = kcalloc(count, sizeof(*sbi->s_partmaps), GFP_KERNEL);
        if (!sbi->s_partmaps) {
-               udf_err(sb, "Unable to allocate space for %d partition maps\n",
-                       count);
                sbi->s_partitions = 0;
                return -ENOMEM;
        }