[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190722172623.4166-14-wsa+renesas@sang-engineering.com>
Date: Mon, 22 Jul 2019 19:26:20 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-i2c@...r.kernel.org
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
Tony Lindgren <tony@...mide.com>,
Lee Jones <lee.jones@...aro.org>, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 13/14] mfd: palmas: convert to i2c_new_dummy_device
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
Generated with coccinelle. Build tested by me and buildbot. Not tested on HW.
drivers/mfd/palmas.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 6818ff34837c..f5b3fa973b13 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -549,12 +549,12 @@ static int palmas_i2c_probe(struct i2c_client *i2c,
palmas->i2c_clients[i] = i2c;
else {
palmas->i2c_clients[i] =
- i2c_new_dummy(i2c->adapter,
+ i2c_new_dummy_device(i2c->adapter,
i2c->addr + i);
- if (!palmas->i2c_clients[i]) {
+ if (IS_ERR(palmas->i2c_clients[i])) {
dev_err(palmas->dev,
"can't attach client %d\n", i);
- ret = -ENOMEM;
+ ret = PTR_ERR(palmas->i2c_clients[i]);
goto err_i2c;
}
palmas->i2c_clients[i]->dev.of_node = of_node_get(node);
--
2.20.1
Powered by blists - more mailing lists