Using device-managed devm_regulator_bulk_get() eliminates the need to
release regulators explicitly.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
if (ret < 0)
return ret;
- ret = regulator_bulk_get(icd->pdev, icl->num_regulators,
- icl->regulators);
+ ret = devm_regulator_bulk_get(icd->pdev, icl->num_regulators,
+ icl->regulators);
if (ret < 0)
goto ereg;
evdc:
ici->ops->remove(icd);
eadd:
- regulator_bulk_free(icl->num_regulators, icl->regulators);
ereg:
v4l2_ctrl_handler_free(&icd->ctrl_handler);
return ret;
}
soc_camera_free_user_formats(icd);
- regulator_bulk_free(icl->num_regulators, icl->regulators);
-
return 0;
}