]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: arizona: Propagate errors from arizona_spk_init
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 18 Jan 2017 15:27:05 +0000 (15:27 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 18 Jan 2017 16:26:56 +0000 (16:26 +0000)
arizona_spk_init uses snd_soc_dapm_new_control which since
commit 37e1df8c95e2 ("ASoC: dapm: handle probe deferrals") will
occasionally request a probe deferral. Which means we should propagate the
error out of our driver from it.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs47l24.c
sound/soc/codecs/wm5102.c
sound/soc/codecs/wm5110.c
sound/soc/codecs/wm8997.c
sound/soc/codecs/wm8998.c

index 73559ae864b656aa224564a089bd336fd9b39dc4..5bf6e599e835a36eb724e6d63a1466378e3ad4e8 100644 (file)
@@ -1121,7 +1121,10 @@ static int cs47l24_codec_probe(struct snd_soc_codec *codec)
 
        priv->core.arizona->dapm = dapm;
 
-       arizona_init_spk(codec);
+       ret = arizona_init_spk(codec);
+       if (ret < 0)
+               return ret;
+
        arizona_init_gpio(codec);
        arizona_init_mono(codec);
        arizona_init_notifiers(codec);
index e7ab37d0dd325c0614e18ce6b2c671acee1c2915..3fd42d30b1ebe3c05f98534812aae22c351e317e 100644 (file)
@@ -1944,7 +1944,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
        if (ret)
                goto err_adsp2_codec_probe;
 
-       arizona_init_spk(codec);
+       ret = arizona_init_spk(codec);
+       if (ret < 0)
+               return ret;
+
        arizona_init_gpio(codec);
        arizona_init_notifiers(codec);
 
index 585fc706c1b0e7b112887be058a755b800ed1ca9..9a9c2d097d9e249ecd2133ae92744967efa3ea3a 100644 (file)
@@ -2279,7 +2279,10 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
 
        priv->core.arizona->dapm = dapm;
 
-       arizona_init_spk(codec);
+       ret = arizona_init_spk(codec);
+       if (ret < 0)
+               return ret;
+
        arizona_init_gpio(codec);
        arizona_init_mono(codec);
        arizona_init_notifiers(codec);
index ee0c8639c7435c823af8fcbc0161dcdc1342c35c..49401a8aae64a972ceaf4e1a4d79717a2e9b6603 100644 (file)
@@ -1062,8 +1062,12 @@ static int wm8997_codec_probe(struct snd_soc_codec *codec)
        struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
        struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
        struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec);
+       int ret;
+
+       ret = arizona_init_spk(codec);
+       if (ret < 0)
+               return ret;
 
-       arizona_init_spk(codec);
        arizona_init_notifiers(codec);
 
        snd_soc_component_disable_pin(component, "HAPTICS");
index 3694f5958d869da5bc6b676bbce0e78acc769f46..44f447136e224d3206839cbf1dee1a62143cae9f 100644 (file)
@@ -1321,10 +1321,14 @@ static int wm8998_codec_probe(struct snd_soc_codec *codec)
        struct wm8998_priv *priv = snd_soc_codec_get_drvdata(codec);
        struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
        struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
+       int ret;
 
        priv->core.arizona->dapm = dapm;
 
-       arizona_init_spk(codec);
+       ret = arizona_init_spk(codec);
+       if (ret < 0)
+               return ret;
+
        arizona_init_gpio(codec);
        arizona_init_notifiers(codec);