diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/max8907-regulator.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index 3a5104f6eed4..e97af8ef3aea 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -323,7 +323,10 @@ static __devinit int max8907_regulator_probe(struct platform_device *pdev) switch (pmic->desc[i].id) { case MAX8907_MBATT: - mbatt_rail_name = idata->constraints.name; + if (idata && idata->constraints.name) + mbatt_rail_name = idata->constraints.name; + else + mbatt_rail_name = pmic->desc[i].name; break; case MAX8907_BBAT: case MAX8907_SDBY: |