Commit 3bd44edd authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Bartosz Golaszewski
Browse files

gpio: regmap: fix memory leak of gpio_regmap structure



The gpio_regmap structure is leaked on the error path. Fix this by
jumping to the appropriate kfree instead of returning directly.

Fixes: db305161 ("gpio: regmap: Allow ngpio to be read from the property")
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Suggested-by: default avatarMichael Walle <mwalle@kernel.org>
Reviewed-by: default avatarMichael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20250922142427.3310221-7-ioana.ciornei@nxp.com


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent c6ccc4dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment