diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index a767e383fb..6ea21a4609 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -163,6 +163,9 @@ int of_regulator_register(struct regulator_dev *rd, struct device_node *node) struct regulator_internal *ri; const char *name; + if (!rd || !node) + return -EINVAL; + rd->boot_on = of_property_read_bool(node, "regulator-boot-on"); name = of_get_property(node, "regulator-name", NULL); |