public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Industry-pack bus: Adjustments for two function implementations
@ 2017-05-13  8:54 SF Markus Elfring
  2017-05-13  8:55 ` [PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id() SF Markus Elfring
  2017-05-13  8:56 ` [PATCH 2/2] ipack: Improve a size determination in ipack_bus_register() SF Markus Elfring
  0 siblings, 2 replies; 7+ messages in thread
From: SF Markus Elfring @ 2017-05-13  8:54 UTC (permalink / raw)
  To: industrypack-devel, Greg Kroah-Hartman, Jens Taprogge,
	Samuel Iglesias Gonsalvez
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 13 May 2017 10:45:54 +0200

Two update suggestions were taken into account
from static source code analysis.

Markus Elfring (2):
  Delete an error message for a failed memory allocation in ipack_device_read_id()
  Improve a size determination in ipack_bus_register()

 drivers/ipack/ipack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.12.3

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id()
@ 2017-05-15  9:08 Samuel Iglesias Gonsálvez
  2017-05-15  9:08 ` [PATCH 2/2] ipack: Improve a size determination in ipack_bus_register() Samuel Iglesias Gonsálvez
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Iglesias Gonsálvez @ 2017-05-15  9:08 UTC (permalink / raw)
  To: gregkh
  Cc: Markus Elfring, jens.taprogge, industrypack-devel, linux-kernel,
	kernel-janitors

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-15  9:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-13  8:54 [PATCH 0/2] Industry-pack bus: Adjustments for two function implementations SF Markus Elfring
2017-05-13  8:55 ` [PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id() SF Markus Elfring
2017-05-13  8:56 ` [PATCH 2/2] ipack: Improve a size determination in ipack_bus_register() SF Markus Elfring
2017-05-15  4:52   ` Samuel Iglesias Gonsálvez
2017-05-15  5:56     ` Greg Kroah-Hartman
2017-05-15  6:40       ` SF Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2017-05-15  9:08 [PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id() Samuel Iglesias Gonsálvez
2017-05-15  9:08 ` [PATCH 2/2] ipack: Improve a size determination in ipack_bus_register() Samuel Iglesias Gonsálvez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox