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] [day] [month] [year] [list]
Message-ID: <e7ebfa5b-3379-3562-1894-fdde9139d532@users.sourceforge.net>
Date:   Tue, 5 Dec 2017 21:30:19 +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 4/4] uwb/i1480/dfu/usb: Delete two error messages for a failed
 memory allocation in i1480_usb_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Tue, 5 Dec 2017 21:07:47 +0100

Omit extra messages 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/usb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/uwb/i1480/dfu/usb.c b/drivers/uwb/i1480/dfu/usb.c
index a50cf45e530f..56bbdc5504d4 100644
--- a/drivers/uwb/i1480/dfu/usb.c
+++ b/drivers/uwb/i1480/dfu/usb.c
@@ -366,10 +366,9 @@ int i1480_usb_probe(struct usb_interface *iface, const struct usb_device_id *id)
 	if (iface->cur_altsetting->desc.bNumEndpoints < 1)
 		return -ENODEV;
 
-	result = -ENOMEM;
 	i1480_usb = kzalloc(sizeof(*i1480_usb), GFP_KERNEL);
 	if (i1480_usb == NULL) {
-		dev_err(dev, "Unable to allocate instance\n");
+		result = -ENOMEM;
 		goto error;
 	}
 	i1480_usb_init(i1480_usb);
@@ -378,7 +377,6 @@ int i1480_usb_probe(struct usb_interface *iface, const struct usb_device_id *id)
 	i1480->buf_size = 512;
 	i1480->cmd_buf = kmalloc(2 * i1480->buf_size, GFP_KERNEL);
 	if (i1480->cmd_buf == NULL) {
-		dev_err(dev, "Cannot allocate transfer buffers\n");
 		result = -ENOMEM;
 		goto error_buf_alloc;
 	}
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ