* [PATCH] platform/x86/mlxcpld-hotplug: Delete an error message for a failed memory allocation in mlxcpld_hotplug_attr_init()
@ 2017-12-19 20:03 SF Markus Elfring
0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2017-12-19 20:03 UTC (permalink / raw)
To: platform-driver-x86, Andy Shevchenko, Darren Hart, Vadim Pasternak
Cc: LKML, kernel-janitors
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-12-19 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-19 20:03 [PATCH] platform/x86/mlxcpld-hotplug: Delete an error message for a failed memory allocation in mlxcpld_hotplug_attr_init() SF Markus Elfring
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®