Skip to content

Commit

Permalink
mfd: Return proper error if tps65090 regmap_init_i2c fails
Browse files Browse the repository at this point in the history
Return proper error instead of 0 if regmap_init_i2c fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed May 9, 2012
1 parent 1379f49 commit b683a0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mfd/tps65090.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ static int __devinit tps65090_i2c_probe(struct i2c_client *client,
tps65090->rmap = regmap_init_i2c(tps65090->client,
&tps65090_regmap_config);
if (IS_ERR(tps65090->rmap)) {
dev_err(&client->dev, "regmap_init failed with err: %ld\n",
PTR_ERR(tps65090->rmap));
ret = PTR_ERR(tps65090->rmap);
dev_err(&client->dev, "regmap_init failed with err: %d\n", ret);
goto err_irq_exit;
};
}

ret = mfd_add_devices(tps65090->dev, -1, tps65090s,
ARRAY_SIZE(tps65090s), NULL, 0);
Expand Down

0 comments on commit b683a0a

Please sign in to comment.