Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1641428

[PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id()

From Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id()
Date 2017-05-15 11:10 +0200
Message-ID <tHkaT-67d-45@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
---

Greg, Would you mind picking this patch series through your char-misc tree?

Sam

 drivers/ipack/ipack.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/ipack/ipack.c b/drivers/ipack/ipack.c
index 12102448fddd..575c4f29e0f7 100644
--- a/drivers/ipack/ipack.c
+++ b/drivers/ipack/ipack.c
@@ -402,7 +402,6 @@ static int ipack_device_read_id(struct ipack_device *dev)
 	 * ID ROM contents */
 	dev->id = kmalloc(dev->id_avail, GFP_KERNEL);
 	if (!dev->id) {
-		dev_err(&dev->dev, "dev->id alloc failed.\n");
 		ret = -ENOMEM;
 		goto out;
 	}
-- 
2.11.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id() Samuel Iglesias Gonsálvez          <siglesias@igalia.com> - 2017-05-15 11:10 +0200

csiph-web