Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_id

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>

authored by

Stephan Gerhold and committed by
Mark Brown
458ea3ad 99c4f70d

-2
-2
include/linux/regulator/ab8500.h
··· 42 42 AB8505_LDO_ANAMIC2, 43 43 AB8505_LDO_AUX8, 44 44 AB8505_LDO_ANA, 45 - AB8505_SYSCLKREQ_2, 46 - AB8505_SYSCLKREQ_4, 47 45 AB8505_NUM_REGULATORS, 48 46 }; 49 47