summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2018-10-09 11:52:21 +0300
committerMark Brown <broonie@kernel.org>2018-10-10 14:28:41 +0300
commitc18fb34ae185ad3b2444cd5e308ef5f91d8c9a46 (patch)
treea7076641cc790a10d0705b28aea2d2e85ba36af9 /drivers/regulator
parentca55b7185b74e73d2b39dc40efaf96100a2582cd (diff)
downloadlinux-c18fb34ae185ad3b2444cd5e308ef5f91d8c9a46.tar.xz
regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode
-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/stpmic1_regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c
index 96f18083a3b6..e15634edb8ce 100644
--- a/drivers/regulator/stpmic1_regulator.c
+++ b/drivers/regulator/stpmic1_regulator.c
@@ -441,7 +441,7 @@ static unsigned int stpmic1_map_mode(unsigned int mode)
case STPMIC1_BUCK_MODE_LP:
return REGULATOR_MODE_STANDBY;
default:
- return -EINVAL;
+ return REGULATOR_MODE_INVALID;
}
}