regulator: da9121: Return REGULATOR_MODE_INVALID for invalid mode
authorAxel Lin <axel.lin@ingics.com>
Mon, 17 May 2021 05:27:21 +0000 (13:27 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 18 May 2021 13:04:21 +0000 (14:04 +0100)
commit0b1e552673724832b08d49037cdeeac634a3b319
treed0c2f24ab6920f848fd6719c330c738107f53f71
parentadf1471b2f7636362718cec42cf11599cced9733
regulator: da9121: Return REGULATOR_MODE_INVALID for invalid mode

-EINVAL is not a valid return value for .of_map_mode, return
REGULATOR_MODE_INVALID instead.

Fixes: 65ac97042d4e ("regulator: da9121: add mode support")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Adam Ward <Adam.Ward.opensource@diasemi.com>
Link: https://lore.kernel.org/r/20210517052721.1063375-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/da9121-regulator.c