public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: industrypack-devel@lists.sourceforge.net,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jens Taprogge <jens.taprogge@taprogge.org>,
	Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 1/2] ipack: Delete an error message for a failed memory allocation in ipack_device_read_id()
Date: Sat, 13 May 2017 10:55:16 +0200	[thread overview]
Message-ID: <2ef624df-6872-a0eb-90bd-4db6b2a248ae@users.sourceforge.net> (raw)
In-Reply-To: <b3fea957-b1bf-f681-8f70-d9d85106651b@users.sourceforge.net>

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

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>
---
 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.12.3

  reply	other threads:[~2017-05-13  8:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13  8:54 [PATCH 0/2] Industry-pack bus: Adjustments for two function implementations SF Markus Elfring
2017-05-13  8:55 ` SF Markus Elfring [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ef624df-6872-a0eb-90bd-4db6b2a248ae@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=industrypack-devel@lists.sourceforge.net \
    --cc=jens.taprogge@taprogge.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=siglesias@igalia.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox