summaryrefslogtreecommitdiff
path: root/drivers/regulator/gpio-regulator.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2014-04-07 23:49:35 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-07 23:49:35 (GMT)
commit62b8c978ee6b8d135d9e7953221de58000dba986 (patch)
tree683b04b2e627f6710c22c151b23c8cc9a165315e /drivers/regulator/gpio-regulator.c
parent78fd82238d0e5716578c326404184a27ba67fd6e (diff)
downloadlinux-fsl-qoriq-62b8c978ee6b8d135d9e7953221de58000dba986.tar.xz
Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12
Diffstat (limited to 'drivers/regulator/gpio-regulator.c')
-rw-r--r--drivers/regulator/gpio-regulator.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 234960d..98a98ff 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -139,7 +139,6 @@ 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),
@@ -203,11 +202,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
}
config->nr_states = i;
- ret = of_property_read_string(np, "regulator-type", &regtype);
- if (ret < 0) {
- dev_err(dev, "Missing 'regulator-type' property\n");
- return ERR_PTR(-EINVAL);
- }
+ of_property_read_string(np, "regulator-type", &regtype);
if (!strncmp("voltage", regtype, 7))
config->type = REGULATOR_VOLTAGE;
@@ -288,6 +283,7 @@ static int gpio_regulator_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "No regulator type set\n");
ret = -EINVAL;
goto err_memgpio;
+ break;
}
drvdata->nr_gpios = config->nr_gpios;