aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/88pm800.c
diff options
context:
space:
mode:
authorYi Zhang <yizhang@marvell.com>2013-01-22 10:43:45 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2013-02-14 00:22:54 +0100
commit306df798507d8e009a7d4a5e8ce238a3b107de20 (patch)
tree763002544391b3f0369dfb46dc4e4993a467e7c6 /drivers/mfd/88pm800.c
parentb3aac62bbb1c3f8e71c88e6e477836def3058fe8 (diff)
downloadkernel_goldelico_gta04-306df798507d8e009a7d4a5e8ce238a3b107de20.zip
kernel_goldelico_gta04-306df798507d8e009a7d4a5e8ce238a3b107de20.tar.gz
kernel_goldelico_gta04-306df798507d8e009a7d4a5e8ce238a3b107de20.tar.bz2
mfd: 88pm80x: Remove redundant devm_* calls
devm_* functions are device managed and make error handling and code simpler; it also fix error exit paths Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/88pm800.c')
-rw-r--r--drivers/mfd/88pm800.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c
index 391e23e..582bda5 100644
--- a/drivers/mfd/88pm800.c
+++ b/drivers/mfd/88pm800.c
@@ -531,7 +531,7 @@ static int pm800_probe(struct i2c_client *client,
ret = device_800_init(chip, pdata);
if (ret) {
dev_err(chip->dev, "%s id 0x%x failed!\n", __func__, chip->id);
- goto err_800_init;
+ goto err_subchip_alloc;
}
ret = pm800_pages_init(chip);
@@ -546,10 +546,8 @@ static int pm800_probe(struct i2c_client *client,
err_page_init:
mfd_remove_devices(chip->dev);
device_irq_exit_800(chip);
-err_800_init:
- devm_kfree(&client->dev, subchip);
err_subchip_alloc:
- pm80x_deinit(client);
+ pm80x_deinit();
out_init:
return ret;
}
@@ -562,9 +560,7 @@ static int pm800_remove(struct i2c_client *client)
device_irq_exit_800(chip);
pm800_pages_exit(chip);
- devm_kfree(&client->dev, chip->subchip);
-
- pm80x_deinit(client);
+ pm80x_deinit();
return 0;
}