diff options
Diffstat (limited to 'drivers/mfd/88pm800.c')
-rw-r--r-- | drivers/mfd/88pm800.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index 391e23e6a647..582bda543520 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c | |||
@@ -531,7 +531,7 @@ static int pm800_probe(struct i2c_client *client, | |||
531 | ret = device_800_init(chip, pdata); | 531 | ret = device_800_init(chip, pdata); |
532 | if (ret) { | 532 | if (ret) { |
533 | dev_err(chip->dev, "%s id 0x%x failed!\n", __func__, chip->id); | 533 | dev_err(chip->dev, "%s id 0x%x failed!\n", __func__, chip->id); |
534 | goto err_800_init; | 534 | goto err_subchip_alloc; |
535 | } | 535 | } |
536 | 536 | ||
537 | ret = pm800_pages_init(chip); | 537 | ret = pm800_pages_init(chip); |
@@ -546,10 +546,8 @@ static int pm800_probe(struct i2c_client *client, | |||
546 | err_page_init: | 546 | err_page_init: |
547 | mfd_remove_devices(chip->dev); | 547 | mfd_remove_devices(chip->dev); |
548 | device_irq_exit_800(chip); | 548 | device_irq_exit_800(chip); |
549 | err_800_init: | ||
550 | devm_kfree(&client->dev, subchip); | ||
551 | err_subchip_alloc: | 549 | err_subchip_alloc: |
552 | pm80x_deinit(client); | 550 | pm80x_deinit(); |
553 | out_init: | 551 | out_init: |
554 | return ret; | 552 | return ret; |
555 | } | 553 | } |
@@ -562,9 +560,7 @@ static int pm800_remove(struct i2c_client *client) | |||
562 | device_irq_exit_800(chip); | 560 | device_irq_exit_800(chip); |
563 | 561 | ||
564 | pm800_pages_exit(chip); | 562 | pm800_pages_exit(chip); |
565 | devm_kfree(&client->dev, chip->subchip); | 563 | pm80x_deinit(); |
566 | |||
567 | pm80x_deinit(client); | ||
568 | 564 | ||
569 | return 0; | 565 | return 0; |
570 | } | 566 | } |