public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
@ 2018-01-24 20:33 Vadim Pasternak
  2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Vadim Pasternak @ 2018-01-24 20:33 UTC (permalink / raw)
  To: dvhart, andy.shevchenko, gregkh
  Cc: linux-kernel, platform-driver-x86, jiri, Vadim Pasternak

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-31 18:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-24 20:33 [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
2018-01-24 20:33 ` [patch v11 - re-ordered 05/12] platform/mellanox: Rename i2c bus to nr Vadim Pasternak
2018-01-25 21:46 ` [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Darren Hart
2018-01-26 16:59   ` Vadim Pasternak
2018-01-26 23:41     ` Darren Hart
2018-01-27  5:08       ` Vadim Pasternak
2018-01-31 18:40       ` Darren Hart
2018-01-31 18:47         ` Vadim Pasternak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox