提交 6daa663d 编写于 作者: D Dan Carpenter 提交者: Samuel Ortiz

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 dc7e412d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册