diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-06-30 03:32:09 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-08-05 13:02:52 -0400 |
commit | 40d3bc19667337d4cbad0075d048261fcbe39117 (patch) | |
tree | 22af50a987b47b20557014085b44c70afff0c7d3 /drivers/regulator/act8865-regulator.c | |
parent | 48a1e1b50d9e848fea9708795bd5d9aa97aa9c2a (diff) |
regulator: act8865: Remove error variable in act8865_pmic_probe
Simply use ret variable instead.
Also remove unneeded initialize for ret variable.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/act8865-regulator.c')
-rw-r--r-- | drivers/regulator/act8865-regulator.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index fe2c038f8cbc..f07be3647985 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c | |||
@@ -278,8 +278,7 @@ static int act8865_pmic_probe(struct i2c_client *client, | |||
278 | struct act8865 *act8865; | 278 | struct act8865 *act8865; |
279 | struct device_node *of_node[ACT8865_REG_NUM]; | 279 | struct device_node *of_node[ACT8865_REG_NUM]; |
280 | int i; | 280 | int i; |
281 | int ret = -EINVAL; | 281 | int ret; |
282 | int error; | ||
283 | 282 | ||
284 | if (dev->of_node && !pdata) { | 283 | if (dev->of_node && !pdata) { |
285 | const struct of_device_id *id; | 284 | const struct of_device_id *id; |
@@ -307,10 +306,10 @@ static int act8865_pmic_probe(struct i2c_client *client, | |||
307 | 306 | ||
308 | act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config); | 307 | act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config); |
309 | if (IS_ERR(act8865->regmap)) { | 308 | if (IS_ERR(act8865->regmap)) { |
310 | error = PTR_ERR(act8865->regmap); | 309 | ret = PTR_ERR(act8865->regmap); |
311 | dev_err(&client->dev, "Failed to allocate register map: %d\n", | 310 | dev_err(&client->dev, "Failed to allocate register map: %d\n", |
312 | error); | 311 | ret); |
313 | return error; | 312 | return ret; |
314 | } | 313 | } |
315 | 314 | ||
316 | /* Finally register devices */ | 315 | /* Finally register devices */ |