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: <f53e3426-14b4-dceb-6599-1d15f3eeee84@users.sourceforge.net>
Date:   Sat, 26 Aug 2017 21:26:44 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     sparclinux@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Rob Herring <robh@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH] sbus: Delete an error message for a failed memory allocation
 in uctrl_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 26 Aug 2017 21:21:33 +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/sbus/char/uctrl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 0a5013350acd..f3b9f7e87ffa 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -352,10 +352,8 @@ static int uctrl_probe(struct platform_device *op)
 	int err = -ENOMEM;
 
 	p = kzalloc(sizeof(*p), GFP_KERNEL);
-	if (!p) {
-		printk(KERN_ERR "uctrl: Unable to allocate device struct.\n");
+	if (!p)
 		goto out;
-	}
 
 	p->regs = of_ioremap(&op->resource[0], 0,
 			     resource_size(&op->resource[0]),
-- 
2.14.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ