regulator: max20411: Fix off-by-one for n_voltages setting
authorAxel Lin <axel.lin@ingics.com>
Sat, 11 Feb 2023 15:00:19 +0000 (23:00 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 13 Feb 2023 12:45:00 +0000 (12:45 +0000)
commit9d1c73191f94c79076b5f46a31b8a1e12b18bc79
tree7292b5fd74d075fa6d4fd68d995983d567139c08
parent6caacd82f09c183a91951776cd8d326e46ef84b4
regulator: max20411: Fix off-by-one for n_voltages setting

Otherwise regulator_list_voltage returns -EINVAL for MAX20411_MAX_SEL.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20230211150019.1545542-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max20411-regulator.c