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: <73220c52-2399-12a5-276d-9145877a5bea@users.sourceforge.net>
Date:   Tue, 9 Jan 2018 17:40:05 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     kernel-janitors@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] misc/phantom: Delete an error message for a failed memory
 allocation in phantom_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 9 Jan 2018 17:25:59 +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/misc/phantom.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c
index 8fa68cf308e0..ab55d2114136 100644
--- a/drivers/misc/phantom.c
+++ b/drivers/misc/phantom.c
@@ -365,10 +365,8 @@ static int phantom_probe(struct pci_dev *pdev,
 
 	retval = -ENOMEM;
 	pht = kzalloc(sizeof(*pht), GFP_KERNEL);
-	if (pht == NULL) {
-		dev_err(&pdev->dev, "unable to allocate device\n");
+	if (!pht)
 		goto err_reg;
-	}
 
 	pht->caddr = pci_iomap(pdev, 0, 0);
 	if (pht->caddr == NULL) {
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ