for (i = 0; i < S5C73M3_MAX_SUPPLIES; i++)
state->supplies[i].supply = s5c73m3_supply_names[i];
- ret = regulator_bulk_get(dev, S5C73M3_MAX_SUPPLIES,
+ ret = devm_regulator_bulk_get(dev, S5C73M3_MAX_SUPPLIES,
state->supplies);
if (ret) {
dev_err(dev, "failed to get regulators\n");
ret = s5c73m3_init_controls(state);
if (ret)
- goto out_err3;
+ goto out_err2;
state->sensor_pix_size[RES_ISP] = &s5c73m3_isp_resolutions[1];
state->sensor_pix_size[RES_JPEG] = &s5c73m3_jpeg_resolutions[1];
ret = s5c73m3_register_spi_driver(state);
if (ret < 0)
- goto out_err3;
+ goto out_err2;
state->i2c_client = client;
v4l2_info(sd, "%s: completed succesfully\n", __func__);
return 0;
-out_err3:
- regulator_bulk_free(S5C73M3_MAX_SUPPLIES, state->supplies);
out_err2:
s5c73m3_free_gpios(state);
out_err1:
media_entity_cleanup(&sd->entity);
s5c73m3_unregister_spi_driver(state);
- regulator_bulk_free(S5C73M3_MAX_SUPPLIES, state->supplies);
s5c73m3_free_gpios(state);
return 0;