MLK-19972-2: ASoC: fsl: dsp: Fix component creation cleanup path
Because we don't correctly free resources when an error occurs
on component creation path we can end up with partially initialized
components.
Freeing such partially initialized components most of the time leads
to kernel crashing in pain.
Avoid this by making sure we either:
* return a fully initialized component, comp->active = true
* don't "create" the component at all, comp->active = false
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2 files changed