Skip to content

Commit

Permalink
regulator: Storing tps65912 error codes in u8
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Samuel Ortiz committed Jul 31, 2011
1 parent dc7e412 commit 6daa663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/tps65912-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6daa663

Please sign in to comment.