Skip to content
Commit 529a1101 authored by Marc Zyngier's avatar Marc Zyngier Committed by Lee Jones
Browse files

mfd: syscon: Don't free allocated name for regmap_config



The name allocated for the regmap_config structure is freed
pretty early, right after the registration of the MMIO region.

Unfortunately, that doesn't follow the life cycle that debugfs
expects, as it can access the name field long after the free
has occurred.

Move the free on the error path, and keep it forever otherwise.

Fixes: e15d7f2b ("mfd: syscon: Use a unique name with regmap_config")
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 05027df1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment