From: Axel Lin Date: Tue, 9 Oct 2018 08:52:21 +0000 (+0800) Subject: regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode X-Git-Tag: v4.20-rc1~184^2~1^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=c18fb34ae185ad3b2444cd5e308ef5f91d8c9a46;p=linux.git 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 Signed-off-by: Mark Brown --- 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; } }