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

regulator: da9062: Return REGULATOR_MODE_INVALID for invalid mode

-EINVAL is not a valid return value for .of_map_mode, return
REGULATOR_MODE_INVALID instead.

Fixes: 844e7492ee3d ("regulator: da9062: add of_map_mode support for bucks")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20191122045154.802-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
c15d5a64 76bec25b

+1 -1
+1 -1
drivers/regulator/da9062-regulator.c
··· 108 108 case DA9063_BUCK_MODE_AUTO: 109 109 return REGULATOR_MODE_NORMAL; 110 110 default: 111 - return -EINVAL; 111 + return REGULATOR_MODE_INVALID; 112 112 } 113 113 } 114 114