aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/s5k6aa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/i2c/s5k6aa.c')
-rw-r--r--drivers/media/i2c/s5k6aa.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c
index 57cd4fa0193d..bdf5e3db31d1 100644
--- a/drivers/media/i2c/s5k6aa.c
+++ b/drivers/media/i2c/s5k6aa.c
@@ -1598,7 +1598,7 @@ static int s5k6aa_probe(struct i2c_client *client,
1598 for (i = 0; i < S5K6AA_NUM_SUPPLIES; i++) 1598 for (i = 0; i < S5K6AA_NUM_SUPPLIES; i++)
1599 s5k6aa->supplies[i].supply = s5k6aa_supply_names[i]; 1599 s5k6aa->supplies[i].supply = s5k6aa_supply_names[i];
1600 1600
1601 ret = regulator_bulk_get(&client->dev, S5K6AA_NUM_SUPPLIES, 1601 ret = devm_regulator_bulk_get(&client->dev, S5K6AA_NUM_SUPPLIES,
1602 s5k6aa->supplies); 1602 s5k6aa->supplies);
1603 if (ret) { 1603 if (ret) {
1604 dev_err(&client->dev, "Failed to get regulators\n"); 1604 dev_err(&client->dev, "Failed to get regulators\n");
@@ -1607,7 +1607,7 @@ static int s5k6aa_probe(struct i2c_client *client,
1607 1607
1608 ret = s5k6aa_initialize_ctrls(s5k6aa); 1608 ret = s5k6aa_initialize_ctrls(s5k6aa);
1609 if (ret) 1609 if (ret)
1610 goto out_err4; 1610 goto out_err3;
1611 1611
1612 s5k6aa_presets_data_init(s5k6aa); 1612 s5k6aa_presets_data_init(s5k6aa);
1613 1613
@@ -1618,8 +1618,6 @@ static int s5k6aa_probe(struct i2c_client *client,
1618 1618
1619 return 0; 1619 return 0;
1620 1620
1621out_err4:
1622 regulator_bulk_free(S5K6AA_NUM_SUPPLIES, s5k6aa->supplies);
1623out_err3: 1621out_err3:
1624 s5k6aa_free_gpios(s5k6aa); 1622 s5k6aa_free_gpios(s5k6aa);
1625out_err2: 1623out_err2:
@@ -1635,7 +1633,6 @@ static int s5k6aa_remove(struct i2c_client *client)
1635 v4l2_device_unregister_subdev(sd); 1633 v4l2_device_unregister_subdev(sd);
1636 v4l2_ctrl_handler_free(sd->ctrl_handler); 1634 v4l2_ctrl_handler_free(sd->ctrl_handler);
1637 media_entity_cleanup(&sd->entity); 1635 media_entity_cleanup(&sd->entity);
1638 regulator_bulk_free(S5K6AA_NUM_SUPPLIES, s5k6aa->supplies);
1639 s5k6aa_free_gpios(s5k6aa); 1636 s5k6aa_free_gpios(s5k6aa);
1640 1637
1641 return 0; 1638 return 0;