mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	kernel-janitors@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 4/6] PNP: Delete an error message for a failed memory allocation in pnp_clone_dependent_set()
Date: Mon, 15 May 2017 21:18:31 +0200	[thread overview]
Message-ID: <77feb0e9-ef3b-15bb-bc0b-666c9632c9e0@users.sourceforge.net> (raw)
In-Reply-To: <94f6ec12-0092-e1e6-3fb1-81f9630eae1f@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 15 May 2017 20:00:38 +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/pnp/quirks.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 215a50723243..34e2d4563bbd 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -159,8 +159,5 @@ static struct pnp_option *pnp_clone_dependent_set(struct pnp_dev *dev,
-			if (!new_option) {
-				dev_err(&dev->dev, "couldn't clone dependent "
-					"set %d\n", set);
+			if (!new_option)
 				return NULL;
-			}
 
 			*new_option = *option;
 			new_option->flags = flags;
-- 
2.13.0

  parent reply	other threads:[~2017-05-15 19:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 19:10 [PATCH 0/6] PNP: Adjustments for four function implementations SF Markus Elfring
2017-05-15 19:12 ` [PATCH 1/6] PNP: Delete an error message for a failed memory allocation in pnp_alloc() SF Markus Elfring
2017-05-15 19:14 ` [PATCH 2/6] PNP: Improve a size determination in pnp_alloc_dev() SF Markus Elfring
2017-05-15 19:16 ` [PATCH 3/6] PNP: Improve a size determination in pnp_clone_dependent_set() SF Markus Elfring
2017-05-15 19:18 ` SF Markus Elfring [this message]
2017-05-15 19:20 ` [PATCH 5/6] PNP: Improve a size determination in quirk_awe32_add_ports() SF Markus Elfring
2017-05-15 19:22 ` [PATCH 6/6] PNP: Delete an error message for a failed memory allocation " SF Markus Elfring
2017-05-27 19:08 ` [PATCH 0/6] PNP: Adjustments for four function implementations Andy Shevchenko
2017-12-18 18:21 ` SF Markus Elfring

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=77feb0e9-ef3b-15bb-bc0b-666c9632c9e0@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.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

Powered by JetHome