regulator: max8660: Handle empty regulator data
It is not necessary to have regulator init data for a regulator. This patch removes the necessity of this data and handles a NULL pointer properly. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dfb85ba114
commit
c0cf5a59fb
|
@ -442,8 +442,8 @@ static int max8660_probe(struct i2c_client *client,
|
||||||
for (i = 0; i < pdata->num_subdevs; i++) {
|
for (i = 0; i < pdata->num_subdevs; i++) {
|
||||||
|
|
||||||
if (!pdata->subdevs[i].platform_data)
|
if (!pdata->subdevs[i].platform_data)
|
||||||
return ret;
|
boot_on = false;
|
||||||
|
else
|
||||||
boot_on = pdata->subdevs[i].platform_data->constraints.boot_on;
|
boot_on = pdata->subdevs[i].platform_data->constraints.boot_on;
|
||||||
|
|
||||||
switch (pdata->subdevs[i].id) {
|
switch (pdata->subdevs[i].id) {
|
||||||
|
|
Loading…
Reference in a new issue