]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode
authorAxel Lin <axel.lin@ingics.com>
Tue, 9 Oct 2018 08:52:21 +0000 (16:52 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 10 Oct 2018 11:28:41 +0000 (12:28 +0100)
-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>
drivers/regulator/stpmic1_regulator.c

index 96f18083a3b6f6f6462d1f109b1138c1b39e3a99..e15634edb8cef8db5a0437ba947066a52097a9e5 100644 (file)
@@ -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;
        }
 }