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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Dec 2017 21:29:13 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-usb@...r.kernel.org,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Johan Hovold <johan@...nel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 3/4] uwb/i1480/dfu/mac: Delete an error message for a failed
 memory allocation in fw_hdrs_load()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 5 Dec 2017 21:00:03 +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/uwb/i1480/dfu/mac.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/uwb/i1480/dfu/mac.c b/drivers/uwb/i1480/dfu/mac.c
index 6ec14f5fcde4..ee71973f47ad 100644
--- a/drivers/uwb/i1480/dfu/mac.c
+++ b/drivers/uwb/i1480/dfu/mac.c
@@ -123,11 +123,9 @@ int fw_hdrs_load(struct i1480 *i1480, struct fw_hdr **phdr,
 	data_itr = data;
 	data_top = (u32 *) (_data + data_size);
 	while (data_itr < data_top) {
-		result = -ENOMEM;
 		hdr = kmalloc(sizeof(*hdr), GFP_KERNEL);
 		if (hdr == NULL) {
-			dev_err(i1480->dev, "Cannot allocate fw header "
-			       "for chunk #%u\n", hdr_cnt);
+			result = -ENOMEM;
 			goto error_alloc;
 		}
 		result = fw_hdr_load(i1480, hdr, hdr_cnt,
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ