[PATCH] mfd: stmpe: Fix a corner case in stmpe_probe()

Linus Walleij linus.walleij at linaro.org
Mon Jun 19 00:03:42 PDT 2023


On Sat, Jun 17, 2023 at 12:43 PM Christophe JAILLET
<christophe.jaillet at wanadoo.fr> wrote:

> In stmpe_probe(), if some regulator_enable() calls fail, probing continues
> and there is only a dev_warn().
>
> So, if stmpe_probe() is called the regulator may not be enabled. It is
> cleaner to test it before calling regulator_disable() in the remove
> function.
>
> Fixes: 9c9e321455fb ("mfd: stmpe: add optional regulators")
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>

Looks correct!
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list