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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <378e6889-d956-af80-7885-4bc8c6500d1f@users.sourceforge.net>
Date:   Mon, 16 Oct 2017 14:18:07 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     "David S. Miller" <davem@...emloft.net>,
        Jarod Wilson <jarod@...hat.com>,
        Johannes Berg <johannes.berg@...el.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        kernel-janitors@...r.kernel.org
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3] char/pcmcia: Delete an error message for a failed memory
 allocation in mgslpc_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 16 Oct 2017 11:46:38 +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@...rs.sourceforge.net>
---
 drivers/char/pcmcia/synclink_cs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 62be953e5fb0..4db7eda2e7f2 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -520,10 +520,8 @@ static int mgslpc_probe(struct pcmcia_device *link)
 		printk("mgslpc_attach\n");
 
 	info = kzalloc(sizeof(MGSLPC_INFO), GFP_KERNEL);
-	if (!info) {
-		printk("Error can't allocate device instance data\n");
+	if (!info)
 		return -ENOMEM;
-	}
 
 	info->magic = MGSLPC_MAGIC;
 	tty_port_init(&info->port);
-- 
2.14.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ