[alsa-devel] [PATCH] ASoC: core: Fail probe if we fail to add dai widgets
Mark Brown
broonie at kernel.org
Tue Apr 1 14:30:46 CEST 2014
On Mon, Mar 31, 2014 at 03:47:12PM +0100, Nariman Poushin wrote:
> Signed-off-by: Nariman Poushin <nariman at opensource.wolfsonmicro.com>
So, I've applied this on the basis that it'll at least print an error
but...
> + list_for_each_entry(dai, &codec->component.dai_list, list) {
> + ret = snd_soc_dapm_new_dai_widgets(&codec->dapm, dai);
> +
> + if (ret != 0) {
> + dev_err(codec->dev,
> + "Failed to create DAI widgets %d\n", ret);
> + goto err_probe;
> + }
> + }
...this doesn't actually do any cleanup of the widgets that were added
if the failure isn't the first one in the loop (which is a prexisting
bug with the handling of errors on probe()). We're also not checking the
_new_controls() immediately before (but again, that's a prexisting bug).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140401/8de42606/attachment-0001.sig>
More information about the Alsa-devel
mailing list