quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 16 Aug 2017 14:16:30 +0000 (16:16 +0200)
committerJan Kara <jack@suse.cz>
Mon, 21 Aug 2017 14:02:59 +0000 (16:02 +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>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/quota_v2.c

index ca71bf881ad1e33d11c1fdd10b71070c5079358d..2259329616b7ed04712cf4da698c3fe1ec137e83 100644 (file)
@@ -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 */