Commit 40d3bc19 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

regulator: act8865: Remove error variable in act8865_pmic_probe



Simply use ret variable instead.
Also remove unneeded initialize for ret variable.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 48a1e1b5
......@@ -278,8 +278,7 @@ static int act8865_pmic_probe(struct i2c_client *client,
struct act8865 *act8865;
struct device_node *of_node[ACT8865_REG_NUM];
int i;
int ret = -EINVAL;
int error;
int ret;
if (dev->of_node && !pdata) {
const struct of_device_id *id;
......@@ -307,10 +306,10 @@ static int act8865_pmic_probe(struct i2c_client *client,
act8865->regmap = devm_regmap_init_i2c(client, &act8865_regmap_config);
if (IS_ERR(act8865->regmap)) {
error = PTR_ERR(act8865->regmap);
ret = PTR_ERR(act8865->regmap);
dev_err(&client->dev, "Failed to allocate register map: %d\n",
error);
return error;
ret);
return ret;
}
/* Finally register devices */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment