summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2015-04-10 15:23:42 +0200
committerMark Brown <broonie@kernel.org>2015-04-10 18:17:53 +0100
commitc0cf5a59fb69527151eb8e332a1b9660200f66c6 (patch)
tree49c30d63791ded52d3bf221b621beecab57c087a /drivers/regulator
parentdfb85ba1140ab649f6f0bf3e502ac37c0f69dbcb (diff)
downloadlinux-c0cf5a59fb69527151eb8e332a1b9660200f66c6.tar.bz2
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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/max8660.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index f187c8f13e22..4071d74fa828 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -442,9 +442,9 @@ static int max8660_probe(struct i2c_client *client,
for (i = 0; i < pdata->num_subdevs; i++) {
if (!pdata->subdevs[i].platform_data)
- return ret;
-
- boot_on = pdata->subdevs[i].platform_data->constraints.boot_on;
+ boot_on = false;
+ else
+ boot_on = pdata->subdevs[i].platform_data->constraints.boot_on;
switch (pdata->subdevs[i].id) {
case MAX8660_V3: