From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Jan Kara <jack@suse.com>, kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] fs-udf: Delete an error message for a failed memory allocation in two functions
Date: Tue, 15 Aug 2017 17:36:53 +0200 [thread overview]
Message-ID: <c06a4161-6f8f-fde9-61b7-d5117a07bd6e@users.sourceforge.net> (raw)
In-Reply-To: <6eedcf1a-57f0-2ba4-d1b8-47a8da945d87@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 15 Aug 2017 16:14:19 +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>
---
fs/udf/inode.c | 7 +------
fs/udf/super.c | 2 --
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 18fdb9d90812..7b50afc6e0c3 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -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;
}
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 462ac2e9258c..ca4b4274b524 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -271,6 +271,4 @@ static int udf_sb_alloc_partition_maps(struct super_block *sb, u32 count)
if (!sbi->s_partmaps) {
- udf_err(sb, "Unable to allocate space for %d partition maps\n",
- count);
sbi->s_partitions = 0;
return -ENOMEM;
}
--
2.14.0
next prev parent reply other threads:[~2017-08-15 15:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 15:35 [PATCH 0/3] fs-udf: Adjustments for some function implementations SF Markus Elfring
2017-08-15 15:36 ` SF Markus Elfring [this message]
2017-08-15 15:37 ` [PATCH 2/3] fs-udf: Improve six size determinations SF Markus Elfring
2017-08-15 15:38 ` [PATCH 3/3] fs-udf: Adjust two checks for null pointers SF Markus Elfring
2017-08-16 14:43 ` [PATCH 0/3] fs-udf: Adjustments for some function implementations Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c06a4161-6f8f-fde9-61b7-d5117a07bd6e@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=jack@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®