summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-07-22 13:26:20 -0400
committerLee Jones <lee.jones@linaro.org>2019-08-12 03:54:16 -0400
commitad9fc1f4229ed390590c3ea5be23addf84d54672 (patch)
tree9183cbe0565062a0b2b63c9cf69b21f678014872
parent7a99c8f3310b13c87ec87114e6fa3e915005b187 (diff)
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@sang-engineering.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/palmas.c6
1 files 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,
549 palmas->i2c_clients[i] = i2c; 549 palmas->i2c_clients[i] = i2c;
550 else { 550 else {
551 palmas->i2c_clients[i] = 551 palmas->i2c_clients[i] =
552 i2c_new_dummy(i2c->adapter, 552 i2c_new_dummy_device(i2c->adapter,
553 i2c->addr + i); 553 i2c->addr + i);
554 if (!palmas->i2c_clients[i]) { 554 if (IS_ERR(palmas->i2c_clients[i])) {
555 dev_err(palmas->dev, 555 dev_err(palmas->dev,
556 "can't attach client %d\n", i); 556 "can't attach client %d\n", i);
557 ret = -ENOMEM; 557 ret = PTR_ERR(palmas->i2c_clients[i]);
558 goto err_i2c; 558 goto err_i2c;
559 } 559 }
560 palmas->i2c_clients[i]->dev.of_node = of_node_get(node); 560 palmas->i2c_clients[i]->dev.of_node = of_node_get(node);