diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-25 09:30:36 +0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-08-02 18:13:57 -0700 |
commit | 31a95b617e35526700d2e394e48538bf3e2aa2af (patch) | |
tree | 1a4fc29bc349db5ac50b2f9977a8fdd36a190443 | |
parent | b7582d0944f6329e8eb3804fd0a53eaacefe4395 (diff) |
mfd: Return proper error if tps65090 regmap_init_i2c fails
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>
(Cherrypicked from mainline
b683a0a675560307ebc458cf9044d98d27820b7c)
Change-Id: I2643a80e320664723d0fbb91b22120ec8d82a7df
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/120370
-rw-r--r-- | drivers/mfd/tps65090.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index 6dc4c345ea68..d9940870a688 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c @@ -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); |