lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <39aa4ad5-ba12-ee30-1ca9-8699acde521b@users.sourceforge.net>
Date:   Thu, 11 May 2017 16:23:31 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-metag@...r.kernel.org, James Hogan <james.hogan@...tec.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] metag-TCM: Delete an error message for a failed memory
 allocation in tcm_add_region()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 11 May 2017 16:16:32 +0200

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

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/metag/kernel/tcm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/metag/kernel/tcm.c b/arch/metag/kernel/tcm.c
index 5d102b31ce84..6c9985591cf1 100644
--- a/arch/metag/kernel/tcm.c
+++ b/arch/metag/kernel/tcm.c
@@ -115,10 +115,8 @@ int __init tcm_add_region(struct tcm_region *reg)
 	struct tcm_pool *pool;
 
 	pool = kmalloc(sizeof(*pool), GFP_KERNEL);
-	if (!pool) {
-		pr_err("Failed to alloc memory for TCM pool!\n");
+	if (!pool)
 		return -ENOMEM;
-	}
 
 	pool->tag = reg->tag;
 	pool->start = reg->res.start;
-- 
2.12.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ