aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/twl6040.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index daf66942071c..7361dbe96be8 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -619,7 +619,7 @@ static int twl6040_probe(struct i2c_client *client,
619 "twl6040_irq_th", twl6040); 619 "twl6040_irq_th", twl6040);
620 if (ret) { 620 if (ret) {
621 dev_err(twl6040->dev, "Thermal IRQ request failed: %d\n", ret); 621 dev_err(twl6040->dev, "Thermal IRQ request failed: %d\n", ret);
622 goto thirq_err; 622 goto readyirq_err;
623 } 623 }
624 624
625 /* dual-access registers controlled by I2C only */ 625 /* dual-access registers controlled by I2C only */
@@ -659,14 +659,10 @@ static int twl6040_probe(struct i2c_client *client,
659 ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children, 659 ret = mfd_add_devices(&client->dev, -1, twl6040->cells, children,
660 NULL, 0, NULL); 660 NULL, 0, NULL);
661 if (ret) 661 if (ret)
662 goto mfd_err; 662 goto readyirq_err;
663 663
664 return 0; 664 return 0;
665 665
666mfd_err:
667 devm_free_irq(&client->dev, twl6040->irq_th, twl6040);
668thirq_err:
669 devm_free_irq(&client->dev, twl6040->irq_ready, twl6040);
670readyirq_err: 666readyirq_err:
671 regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); 667 regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
672gpio_err: 668gpio_err:
@@ -684,8 +680,6 @@ static int twl6040_remove(struct i2c_client *client)
684 if (twl6040->power_count) 680 if (twl6040->power_count)
685 twl6040_power(twl6040, 0); 681 twl6040_power(twl6040, 0);
686 682
687 devm_free_irq(&client->dev, twl6040->irq_ready, twl6040);
688 devm_free_irq(&client->dev, twl6040->irq_th, twl6040);
689 regmap_del_irq_chip(twl6040->irq, twl6040->irq_data); 683 regmap_del_irq_chip(twl6040->irq, twl6040->irq_data);
690 684
691 mfd_remove_devices(&client->dev); 685 mfd_remove_devices(&client->dev);