mbox series

[v2,0/3] mfd: exynos-lpass: Fix some error handling paths

Message ID cover.1745247209.git.christophe.jaillet@wanadoo.fr
Headers show
Series mfd: exynos-lpass: Fix some error handling paths | expand

Message

Christophe JAILLET April 21, 2025, 3 p.m. UTC
This serie fixes several issues related to error handling paths in
drivers/mfd/exynos-lpass.c.

I've split it in 3 patches to ease review, but it could be merge in only
1 patch if preferred.

Patch 1: Fix a leak in the error handling path of the probe. It should
be straighforward. This patch is already R-b.

Patch 2: Slighly unsure of the order of the code. In the probe, we
enable pm, then lpass, so should we disable lpass, then pm?
This patch is already R-b.

Patch 3: Fix a leak in the error handling path of the probe. It should
be straighforward. This replaces patch 3 and 4 of the v1.


All these patches are compile tested only.

Christophe JAILLET (3):
  mfd: exynos-lpass: Fix an error handling path in exynos_lpass_probe()
  mfd: exynos-lpass: Avoid calling exynos_lpass_disable() twice in
    exynos_lpass_remove()
  mfd: exynos-lpass: Fix another error handling path in
    exynos_lpass_probe()

 drivers/mfd/exynos-lpass.c | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

Comments

Krzysztof Kozlowski April 23, 2025, 4:33 p.m. UTC | #1
On 21/04/2025 17:00, Christophe JAILLET wrote:
> If devm_of_platform_populate() fails, some clean-up needs to be done, as
> already done in the remove function.
> 
> Add a new devm_add_action_or_reset() to fix the leak in the probe and
> remove the need of a remove function.
> 
> Fixes: c695abab2429 ("mfd: Add Samsung Exynos Low Power Audio Subsystem driver")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only.
> 
> Changes in v2:
>   - Use a new devm_add_action_or_reset() to fix the leak in the probe
>     and remove the need of a remove function.
>   - Update the commit description accordingly

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof