aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-07-06 14:57:18 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-07-31 17:28:26 -0400
commit6daa663dc42957ca6c794a84fe07fa09f0273ff9 (patch)
treece482f6811a87c7b77fe7a69b080458fd89151c3 /drivers/regulator
parentdc7e412d431db5da7fa252f4c3ed475ef4af3e8a (diff)
regulator: Storing tps65912 error codes in u8
get_ctrl_reg() returns -EINVAL so the error handling won't work here if reg is a u8. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps65912-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps65912-regulator.c b/drivers/regulator/tps65912-regulator.c
index d2c6542776f1..3a9313e00fac 100644
--- a/drivers/regulator/tps65912-regulator.c
+++ b/drivers/regulator/tps65912-regulator.c
@@ -417,7 +417,7 @@ static int tps65912_reg_enable(struct regulator_dev *dev)
417 struct tps65912_reg *pmic = rdev_get_drvdata(dev); 417 struct tps65912_reg *pmic = rdev_get_drvdata(dev);
418 struct tps65912 *mfd = pmic->mfd; 418 struct tps65912 *mfd = pmic->mfd;
419 int id = rdev_get_id(dev); 419 int id = rdev_get_id(dev);
420 u8 reg; 420 int reg;
421 421
422 if (id < TPS65912_REG_DCDC1 || id > TPS65912_REG_LDO10) 422 if (id < TPS65912_REG_DCDC1 || id > TPS65912_REG_LDO10)
423 return -EINVAL; 423 return -EINVAL;