]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - sound/soc/soc-topology.c
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[mirror_ubuntu-bionic-kernel.git] / sound / soc / soc-topology.c
index fbfb1fab88d5be60de7c40ed8fa1dd78d6fae727..3e9b1c0bb1ce3cb1864e1825ade56720803df289 100644 (file)
@@ -344,7 +344,7 @@ static int soc_tplg_widget_load(struct soc_tplg *tplg,
        return 0;
 }
 
-/* pass DAI configurations to component driver for extra intialization */
+/* pass DAI configurations to component driver for extra initialization */
 static int soc_tplg_dai_load(struct soc_tplg *tplg,
        struct snd_soc_dai_driver *dai_drv)
 {
@@ -354,7 +354,7 @@ static int soc_tplg_dai_load(struct soc_tplg *tplg,
        return 0;
 }
 
-/* pass link configurations to component driver for extra intialization */
+/* pass link configurations to component driver for extra initialization */
 static int soc_tplg_dai_link_load(struct soc_tplg *tplg,
        struct snd_soc_dai_link *link)
 {
@@ -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);
@@ -1862,7 +1871,7 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg,
 {
        struct snd_soc_tplg_pcm *pcm, *_pcm;
        int count = hdr->count;
-       int i, err;
+       int i;
        bool abi_match;
 
        if (tplg->pass != SOC_TPLG_PASS_PCM_DAI)
@@ -1896,7 +1905,7 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg,
                        _pcm = pcm;
                } else {
                        abi_match = false;
-                       err = pcm_new_ver(tplg, pcm, &_pcm);
+                       pcm_new_ver(tplg, pcm, &_pcm);
                }
 
                /* create the FE DAIs and DAI links */
@@ -1918,7 +1927,7 @@ static int soc_tplg_pcm_elems_load(struct soc_tplg *tplg,
 
 /**
  * set_link_hw_format - Set the HW audio format of the physical DAI link.
- * @tplg: topology context
+ * @link: &snd_soc_dai_link which should be updated
  * @cfg: physical link configs.
  *
  * Topology context contains a list of supported HW formats (configs) and
@@ -1969,7 +1978,7 @@ static void set_link_hw_format(struct snd_soc_dai_link *link,
 /**
  * link_new_ver - Create a new physical link config from the old
  * version of source.
- * @toplogy: topology context
+ * @tplg: topology context
  * @src: old version of phyical link config as a source
  * @link: latest version of physical link config created from the source
  *
@@ -2211,7 +2220,7 @@ static int soc_tplg_dai_elems_load(struct soc_tplg *tplg,
 /**
  * manifest_new_ver - Create a new version of manifest from the old version
  * of source.
- * @toplogy: topology context
+ * @tplg: topology context
  * @src: old version of manifest as a source
  * @manifest: latest version of manifest created from the source
  *