Commit 501d609a authored by Wolfram Sang's avatar Wolfram Sang Committed by Samuel Ortiz

mfd: twl6040: Remove obsolete cleanup for i2c clientdata

A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit or error. This is obsolete meanwhile, the core will do it.
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 34c5c735
...@@ -565,13 +565,13 @@ static int twl6040_probe(struct i2c_client *client, ...@@ -565,13 +565,13 @@ static int twl6040_probe(struct i2c_client *client,
twl6040->supplies); twl6040->supplies);
if (ret != 0) { if (ret != 0) {
dev_err(&client->dev, "Failed to get supplies: %d\n", ret); dev_err(&client->dev, "Failed to get supplies: %d\n", ret);
goto regulator_get_err; return ret;
} }
ret = regulator_bulk_enable(TWL6040_NUM_SUPPLIES, twl6040->supplies); ret = regulator_bulk_enable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
if (ret != 0) { if (ret != 0) {
dev_err(&client->dev, "Failed to enable supplies: %d\n", ret); dev_err(&client->dev, "Failed to enable supplies: %d\n", ret);
goto regulator_get_err; return ret;
} }
twl6040->dev = &client->dev; twl6040->dev = &client->dev;
...@@ -671,9 +671,6 @@ static int twl6040_probe(struct i2c_client *client, ...@@ -671,9 +671,6 @@ static int twl6040_probe(struct i2c_client *client,
regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
gpio_err: gpio_err:
regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
regulator_get_err:
i2c_set_clientdata(client, NULL);
return ret; return ret;
} }
...@@ -689,7 +686,6 @@ static int twl6040_remove(struct i2c_client *client) ...@@ -689,7 +686,6 @@ static int twl6040_remove(struct i2c_client *client)
regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
mfd_remove_devices(&client->dev); mfd_remove_devices(&client->dev);
i2c_set_clientdata(client, NULL);
regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies); regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment