Skip to content

Commit

Permalink
mfd: twl6040: Remove obsolete cleanup for i2c clientdata
Browse files Browse the repository at this point in the history
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: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Wolfram Sang authored and Samuel Ortiz committed Oct 24, 2013
1 parent 34c5c73 commit 501d609
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/mfd/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,13 @@ static int twl6040_probe(struct i2c_client *client,
twl6040->supplies);
if (ret != 0) {
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);
if (ret != 0) {
dev_err(&client->dev, "Failed to enable supplies: %d\n", ret);
goto regulator_get_err;
return ret;
}

twl6040->dev = &client->dev;
Expand Down Expand Up @@ -671,9 +671,6 @@ static int twl6040_probe(struct i2c_client *client,
regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
gpio_err:
regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);
regulator_get_err:
i2c_set_clientdata(client, NULL);

return ret;
}

Expand All @@ -689,7 +686,6 @@ static int twl6040_remove(struct i2c_client *client)
regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);

mfd_remove_devices(&client->dev);
i2c_set_clientdata(client, NULL);

regulator_bulk_disable(TWL6040_NUM_SUPPLIES, twl6040->supplies);

Expand Down

0 comments on commit 501d609

Please sign in to comment.