lkml.org 
[lkml]   [2018]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
Date
The upper layer will manage and report errors returned by the create and
destroy functions.

FIXME: but it doesn't - we don't even check

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[dvhart: refactored into smaller functional changes]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
---
drivers/platform/mellanox/mlxreg-hotplug.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
index e55f576..0ccd327 100644
--- a/drivers/platform/mellanox/mlxreg-hotplug.c
+++ b/drivers/platform/mellanox/mlxreg-hotplug.c
@@ -187,16 +187,11 @@ static int mlxreg_hotplug_device_create(struct device *dev,
struct mlxreg_hotplug_device *item)
{
item->adapter = i2c_get_adapter(item->bus);
- if (!item->adapter) {
- dev_err(dev, "Failed to get adapter for bus %d\n",
- item->bus);
+ if (!item->adapter)
return -EFAULT;
- }

item->client = i2c_new_device(item->adapter, &item->brdinfo);
if (!item->client) {
- dev_err(dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
- item->brdinfo.type, item->bus, item->brdinfo.addr);
i2c_put_adapter(item->adapter);
item->adapter = NULL;
return -EFAULT;
--
2.1.4
\
 
 \ /
  Last update: 2018-01-24 19:38    [W:0.182 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site