Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5f52454 authored by Markus Elfring's avatar Markus Elfring Committed by Jan Kara
Browse files

fs-udf: Delete an error message for a failed memory allocation in two functions



Omit an extra message for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 033c9da0
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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;
}

+0 −2
Original line number Diff line number Diff line
@@ -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;
	}