From 6daa663dc42957ca6c794a84fe07fa09f0273ff9 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 6 Jul 2011 21:57:18 +0300 Subject: 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 Signed-off-by: Samuel Ortiz --- drivers/regulator/tps65912-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/regulator/tps65912-regulator.c b/drivers/regulator/tps65912-regulator.c index d2c6542776f..3a9313e00fa 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) struct tps65912_reg *pmic = rdev_get_drvdata(dev); struct tps65912 *mfd = pmic->mfd; int id = rdev_get_id(dev); - u8 reg; + int reg; if (id < TPS65912_REG_DCDC1 || id > TPS65912_REG_LDO10) return -EINVAL; -- cgit v1.2.3-70-g09d2