Re: [PATCH v5 06/12] gpio: regmap: fix memory leak of gpio_regmap structure

From: Michael Walle

Date: Mon Sep 22 2025 - 10:31:23 EST


> The gpio_regmap structure is leaked on the error path. Fix this by
> jumping to the appropriate kfree instead of returning directly.
>
> Fixes: db305161880a ("gpio: regmap: Allow ngpio to be read from the property")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
> Suggested-by: Michael Walle <mwalle@xxxxxxxxxx>

Reviewed-by: Michael Walle <mwalle@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature