[<prev] [next>] [day] [month] [year] [list]
Message-ID: <679408d6-5412-562e-8051-319302635354@users.sourceforge.net>
Date: Tue, 19 Dec 2017 21:03:29 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: platform-driver-x86@...r.kernel.org,
Andy Shevchenko <andy@...radead.org>,
Darren Hart <dvhart@...radead.org>,
Vadim Pasternak <vadimp@...lanox.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH] platform/x86/mlxcpld-hotplug: Delete an error message for a
failed memory allocation in mlxcpld_hotplug_attr_init()
From: Markus Elfring <elfring@...rs.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@...rs.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
Powered by blists - more mailing lists