Skip to content
Commit 36a1f1b6 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mark Brown
Browse files

regulator: core: Fix memory leak in regulator_resolve_supply()



The regulator_resolve_supply() function calls set_supply() which in turn
calls create_regulator() to allocate a supply regulator.

If an error occurs after set_supply() succeeded, the allocated regulator
has to be freed before propagating the error code.

Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e2c09ae7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment