Skip to content

Commit

Permalink
regulator: act8865: Remove error variable in act8865_pmic_probe
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 5, 2014
1 parent 48a1e1b commit 40d3bc1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/regulator/act8865-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 40d3bc1

Please sign in to comment.