aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2018-10-11 14:32:05 -0400
committerMark Brown <broonie@kernel.org>2018-10-12 12:48:40 -0400
commit747df19747bc9752cd40b9cce761e17a033aa5c2 (patch)
treeb656bb606d9401dc91a52cfaef62230d6cb53068
parentc50535ed6a10fcae1b64ae83c0f6b1eeb5535afc (diff)
ASoC: sta32x: set ->component pointer in private struct
The ESD watchdog code in sta32x_watchdog() dereferences the pointer which is never assigned. This is a regression from a1be4cead9b950 ("ASoC: sta32x: Convert to direct regmap API usage.") which went unnoticed since nobody seems to use that ESD workaround. Fixes: a1be4cead9b950 ("ASoC: sta32x: Convert to direct regmap API usage.") Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-rw-r--r--sound/soc/codecs/sta32x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index d5035f2f2b2b..ce508b4cc85c 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -879,6 +879,9 @@ static int sta32x_probe(struct snd_soc_component *component)
879 struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component); 879 struct sta32x_priv *sta32x = snd_soc_component_get_drvdata(component);
880 struct sta32x_platform_data *pdata = sta32x->pdata; 880 struct sta32x_platform_data *pdata = sta32x->pdata;
881 int i, ret = 0, thermal = 0; 881 int i, ret = 0, thermal = 0;
882
883 sta32x->component = component;
884
882 ret = regulator_bulk_enable(ARRAY_SIZE(sta32x->supplies), 885 ret = regulator_bulk_enable(ARRAY_SIZE(sta32x->supplies),
883 sta32x->supplies); 886 sta32x->supplies);
884 if (ret != 0) { 887 if (ret != 0) {