Skip to content
Unverified Commit 78a24e10 authored by Curtis Malainey's avatar Curtis Malainey Committed by Mark Brown
Browse files

ASoC: soc-core: clear platform pointers on error



Originally snd_soc_init_platform was not cleaning up its pointers, this
was fixed to always reallocate dynamic memory but created a memory leak
when snd_soc_init_platform was called multiple times during the same
probe attempt and also threw away any changes made to the struct between
calls. In order to avoid reallocating memory that is still valid, the
behaviour will be changed to clear the dynamically set pointers on a
probe error and a unregister event and snd_soc_init_platform will go
back to its original behaviour of only allocating null pointers so it will
stop throwing away valid changes.

Signed-off-by: default avatarCurtis Malainey <cujomalainey@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 11907e9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment