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 96f1808..e15634e 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;
        }
 }