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]
Date:   Sun, 10 Dec 2017 17:25:59 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     kernel-janitors@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] tty: cyclades: Delete an error message for a failed memory
 allocation in cy_init_card()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 10 Dec 2017 17:21:28 +0100

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@...rs.sourceforge.net>
---
 drivers/tty/cyclades.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index 5d442469c95e..a0dbce2cf2d9 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -3061,10 +3061,8 @@ static int cy_init_card(struct cyclades_card *cinfo)
 
 	cinfo->ports = kcalloc(cinfo->nports, sizeof(*cinfo->ports),
 			GFP_KERNEL);
-	if (cinfo->ports == NULL) {
-		printk(KERN_ERR "Cyclades: cannot allocate ports\n");
+	if (!cinfo->ports)
 		return -ENOMEM;
-	}
 
 	for (channel = 0, port = cinfo->first_line; channel < cinfo->nports;
 			channel++, port++) {
-- 
2.15.1

Powered by blists - more mailing lists