Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
[sfrench/cifs-2.6.git] / sound / soc / soc-topology.c
index fbfb1fab88d5be60de7c40ed8fa1dd78d6fae727..01e8bb0910b205dbc3cd494c2e4567100ec79397 100644 (file)
@@ -1555,6 +1555,15 @@ widget:
                widget = snd_soc_dapm_new_control(dapm, &template);
        else
                widget = snd_soc_dapm_new_control_unlocked(dapm, &template);
+       if (IS_ERR(widget)) {
+               ret = PTR_ERR(widget);
+               /* Do not nag about probe deferrals */
+               if (ret != -EPROBE_DEFER)
+                       dev_err(tplg->dev,
+                               "ASoC: failed to create widget %s controls (%d)\n",
+                               w->name, ret);
+               goto hdr_err;
+       }
        if (widget == NULL) {
                dev_err(tplg->dev, "ASoC: failed to create widget %s controls\n",
                        w->name);