diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-12-09 17:04:37 +0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-09 17:04:37 +0400 |
commit | bdc54ef45d7670aeb52ce73f8b7ad5f3e5563661 (patch) | |
tree | da6e170ce87891a0242de88d8d7c1ba34faf9bb7 /drivers/regulator/gpio-regulator.c | |
parent | 33e0aae11e4854c792e9871f94da6d28bf2e2bb8 (diff) | |
parent | 374b105797c3d4f29c685f3be535c35f5689b30e (diff) | |
download | linux-bdc54ef45d7670aeb52ce73f8b7ad5f3e5563661.tar.xz |
Merge tag 'v3.13-rc3' into devel
Linux 3.13-rc3
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r-- | drivers/regulator/gpio-regulator.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 04406a918c04..234960dc9607 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -139,6 +139,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np) struct property *prop; const char *regtype; int proplen, gpio, i; + int ret; config = devm_kzalloc(dev, sizeof(struct gpio_regulator_config), @@ -202,7 +203,11 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np) } config->nr_states = i; - of_property_read_string(np, "regulator-type", ®type); + ret = of_property_read_string(np, "regulator-type", ®type); + if (ret < 0) { + dev_err(dev, "Missing 'regulator-type' property\n"); + return ERR_PTR(-EINVAL); + } if (!strncmp("voltage", regtype, 7)) config->type = REGULATOR_VOLTAGE; |