Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Samuel Ortiz
6daa663d dc7e412d

+1 -1
+1 -1
drivers/regulator/tps65912-regulator.c
··· 417 417 struct tps65912_reg *pmic = rdev_get_drvdata(dev); 418 418 struct tps65912 *mfd = pmic->mfd; 419 419 int id = rdev_get_id(dev); 420 - u8 reg; 420 + int reg; 421 421 422 422 if (id < TPS65912_REG_DCDC1 || id > TPS65912_REG_LDO10) 423 423 return -EINVAL;