Commit acff07d0 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: arizona: Propagate errors from arizona_spk_init

arizona_spk_init uses snd_soc_dapm_new_control which since
commit 37e1df8c ("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: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a5de5b74
...@@ -1121,7 +1121,10 @@ static int cs47l24_codec_probe(struct snd_soc_codec *codec) ...@@ -1121,7 +1121,10 @@ static int cs47l24_codec_probe(struct snd_soc_codec *codec)
priv->core.arizona->dapm = dapm; 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_gpio(codec);
arizona_init_mono(codec); arizona_init_mono(codec);
arizona_init_notifiers(codec); arizona_init_notifiers(codec);
......
...@@ -1944,7 +1944,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec) ...@@ -1944,7 +1944,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
if (ret) if (ret)
goto err_adsp2_codec_probe; 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_gpio(codec);
arizona_init_notifiers(codec); arizona_init_notifiers(codec);
......
...@@ -2279,7 +2279,10 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) ...@@ -2279,7 +2279,10 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
priv->core.arizona->dapm = dapm; 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_gpio(codec);
arizona_init_mono(codec); arizona_init_mono(codec);
arizona_init_notifiers(codec); arizona_init_notifiers(codec);
......
...@@ -1062,8 +1062,12 @@ static int wm8997_codec_probe(struct snd_soc_codec *codec) ...@@ -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_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec); 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); arizona_init_notifiers(codec);
snd_soc_component_disable_pin(component, "HAPTICS"); snd_soc_component_disable_pin(component, "HAPTICS");
......
...@@ -1321,10 +1321,14 @@ static int wm8998_codec_probe(struct snd_soc_codec *codec) ...@@ -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 wm8998_priv *priv = snd_soc_codec_get_drvdata(codec);
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(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 snd_soc_component *component = snd_soc_dapm_to_component(dapm);
int ret;
priv->core.arizona->dapm = dapm; 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_gpio(codec);
arizona_init_notifiers(codec); arizona_init_notifiers(codec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment