Skip to contentSkip to conversation

regulator: missing index in PTR_ERR() in isl6271a_probe()

PATCH Applied roel kluin 3 participants 3 messages Dec 31, 2010 – Jan 4, 2011 Voltage and current regulator framework

lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 regulator: missing index in PTR_ERR() in isl6271a_probe()

The index is missing so the return is wrong.

---
 drivers/regulator/isl6271a-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/regulator/isl6271a-regulator.c +1 -1
index b8cc638..13e2073 100644
@@ -169,7 +169,7 @@ static int __devinit isl6271a_probe(struct i2c_client *i2c,
 						init_data, pmic);
 		if (IS_ERR(pmic->rdev[i])) {
 			dev_err(&i2c->dev, "failed to register %s\n", id->name);
-			err = PTR_ERR(pmic->rdev);
+			err = PTR_ERR(pmic->rdev[i]);
 			goto error;
 		}
 	}
#2 lore raw
In reply to roel kluin
Quoted 6 lines · roel kluin

The index is missing so the return is wrong.

---
 drivers/regulator/isl6271a-regulator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk