Skip to content
Snippets Groups Projects
Unverified Commit 572e6c8d authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown
Browse files

ASoC: compress: Only call free for components which have been opened


The core should only call free on a component if said component has
already had open called on it. This is not presently the case and most
compressed drivers in the kernel assume it will be. This causes null
pointer dereferences in the drivers as they attempt clean up for stuff
that was never put in place.

This is fixed by aborting calling open callbacks once a failure is
encountered and then during clean up only iterating through the
component list to that point.

This is a fairly quick fix to the issue, to allow backporting. There
is more refactoring to follow to tidy the code up a little.

Fixes: 9e7e3738 ("ASoC: snd_soc_component_driver has snd_compr_ops")
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 483abace
No related merge requests found
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