summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/fixed.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-27 11:36:16 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-27 11:36:16 +0000
commit6806a663b0a1bb99b18fd5b49e81440eceb2d7a1 (patch)
treef44cd2ccc862acc70944af3338c2c13c54b322f3 /drivers/regulator/fixed.c
parent02fcc84ae551d27c0ef2ee043881cc2afc8f892d (diff)
parentbc91396b0b0a0d1300e151264b81f010c72a8bbf (diff)
downloadlinux-6806a663b0a1bb99b18fd5b49e81440eceb2d7a1.tar.bz2
Merge remote-tracking branch 'regulator/topic/dt' into regulator-next
Diffstat (limited to 'drivers/regulator/fixed.c')
-rw-r--r--drivers/regulator/fixed.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 716ea375f50f..6828dce72371 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -51,7 +51,8 @@ struct fixed_voltage_data {
* tree node, returns a pointer to the populated structure of NULL if memory
* alloc fails.
*/
-struct fixed_voltage_config *of_get_fixed_voltage_config(struct device *dev)
+static struct fixed_voltage_config *
+of_get_fixed_voltage_config(struct device *dev)
{
struct fixed_voltage_config *config;
struct device_node *np = dev->of_node;
@@ -64,6 +65,9 @@ struct fixed_voltage_config *of_get_fixed_voltage_config(struct device *dev)
return NULL;
config->init_data = of_get_regulator_init_data(dev);
+ if (!config->init_data)
+ return NULL;
+
init_data = config->init_data;
config->supply_name = init_data->constraints.name;