]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id
authorStephan Gerhold <stephan@gerhold.net>
Wed, 6 Nov 2019 17:31:25 +0000 (18:31 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 11 Feb 2020 20:03:35 +0000 (20:03 +0000)
commit 458ea3ad033fc86e291712ce50cbe60c3428cf30 upstream.

Those regulators are not actually supported by the AB8500 regulator
driver. There is no ab8500_regulator_info for them and no entry in
ab8505_regulator_match.

As such, they cannot be registered successfully, and looking them
up in ab8505_regulator_match causes an out-of-bounds array read.

Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505")
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20191106173125.14496-2-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/linux/regulator/ab8500.h

index 6b8da0177d307c8253324e59454ff4b8d265e7d2..94629517ac698c479141476220f0e39fac461aa2 100644 (file)
@@ -43,8 +43,6 @@ enum ab8505_regulator_id {
        AB8505_LDO_ANAMIC2,
        AB8505_LDO_AUX8,
        AB8505_LDO_ANA,
-       AB8505_SYSCLKREQ_2,
-       AB8505_SYSCLKREQ_4,
        AB8505_NUM_REGULATORS,
 };