提交 c0cf5a59 编写于 作者: M Markus Pargmann 提交者: Mark Brown

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: NMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 dfb85ba1
...@@ -442,9 +442,9 @@ static int max8660_probe(struct i2c_client *client, ...@@ -442,9 +442,9 @@ 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) {
case MAX8660_V3: case MAX8660_V3:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册