From: Axel Lin Date: Thu, 11 Jul 2019 12:21:38 +0000 (+0800) Subject: regulator: rk808: Return REGULATOR_MODE_INVALID for invalid mode X-Git-Tag: v5.4-rc1~197^2^2~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d850c6f5fad60b6edec08300977303aae855ffff;p=thirdparty%2Fkernel%2Flinux.git regulator: rk808: 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 Link: https://lore.kernel.org/r/20190711122138.5221-1-axel.lin@ingics.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index e7af0c53d4496..61bd5ef0806c2 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -606,7 +606,7 @@ static unsigned int rk8xx_regulator_of_map_mode(unsigned int mode) case 2: return REGULATOR_MODE_NORMAL; default: - return -EINVAL; + return REGULATOR_MODE_INVALID; } }