[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77feb0e9-ef3b-15bb-bc0b-666c9632c9e0@users.sourceforge.net>
Date: Mon, 15 May 2017 21:18:31 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
kernel-janitors@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Wolfram Sang <wsa@...-dreams.de>
Subject: [PATCH 4/6] PNP: Delete an error message for a failed memory
allocation in pnp_clone_dependent_set()
From: Markus Elfring <elfring@...rs.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@...rs.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
Powered by blists - more mailing lists