mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info()
@ 2017-08-16 14:41 SF Markus Elfring
  2017-08-21 14:03 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: SF Markus Elfring @ 2017-08-16 14:41 UTC (permalink / raw)
  To: Jan Kara, kernel-janitors; +Cc: LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 16 Aug 2017 16:16:30 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 fs/quota/quota_v2.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c
index ca71bf881ad1..2259329616b7 100644
--- a/fs/quota/quota_v2.c
+++ b/fs/quota/quota_v2.c
@@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type)
 		return -1;
 	}
 	info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS);
-	if (!info->dqi_priv) {
-		printk(KERN_WARNING
-		       "Not enough memory for quota information structure.\n");
+	if (!info->dqi_priv)
 		return -ENOMEM;
-	}
+
 	qinfo = info->dqi_priv;
 	if (version == 0) {
 		/* limits are stored as unsigned 32-bit data */
-- 
2.14.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-21 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-16 14:41 [PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() SF Markus Elfring
2017-08-21 14:03 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome