mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: platform-driver-x86@vger.kernel.org,
	Andy Shevchenko <andy@infradead.org>,
	Darren Hart <dvhart@infradead.org>,
	Vadim Pasternak <vadimp@mellanox.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] platform/x86/mlxcpld-hotplug: Delete an error message for a failed memory allocation in mlxcpld_hotplug_attr_init()
Date: Tue, 19 Dec 2017 21:03:29 +0100	[thread overview]
Message-ID: <679408d6-5412-562e-8051-319302635354@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 19 Dec 2017 20:56:56 +0100

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

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/platform/x86/mlxcpld-hotplug.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/platform/x86/mlxcpld-hotplug.c b/drivers/platform/x86/mlxcpld-hotplug.c
index aff3686b3b37..d45cb8be221f 100644
--- a/drivers/platform/x86/mlxcpld-hotplug.c
+++ b/drivers/platform/x86/mlxcpld-hotplug.c
@@ -165,11 +165,8 @@ static int mlxcpld_hotplug_attr_init(struct mlxcpld_hotplug_priv_data *priv)
 			PRIV_DEV_ATTR(i).nr = MLXCPLD_HOTPLUG_ATTR_TYPE_FAN;
 		}
 
-		if (!PRIV_ATTR(i)->name) {
-			dev_err(&priv->pdev->dev, "Memory allocation failed for sysfs attribute %d.\n",
-				i + 1);
+		if (!PRIV_ATTR(i)->name)
 			return -ENOMEM;
-		}
 
 		PRIV_DEV_ATTR(i).dev_attr.attr.name = PRIV_ATTR(i)->name;
 		PRIV_DEV_ATTR(i).dev_attr.attr.mode = S_IRUGO;
-- 
2.15.1

                 reply	other threads:[~2017-12-19 20:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=679408d6-5412-562e-8051-319302635354@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=vadimp@mellanox.com \
    /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

all inboxes | Powered by JetHome®