]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ASoC: sta32x: set ->component pointer in private struct
authorDaniel Mack <daniel@zonque.org>
Thu, 11 Oct 2018 18:32:05 +0000 (20:32 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1837257
commit 747df19747bc9752cd40b9cce761e17a033aa5c2 upstream

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
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/codecs/sta32x.c

index 5b888476d9ff110b26cc6d42f1a7c808f05027ea..b728140c79a9bdd185a6073251f984454db070a7 100644 (file)
@@ -879,6 +879,9 @@ static int sta32x_probe(struct snd_soc_codec *codec)
        struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec);
        struct sta32x_platform_data *pdata = sta32x->pdata;
        int i, ret = 0, thermal = 0;
+
+       sta32x->codec = codec;
+
        ret = regulator_bulk_enable(ARRAY_SIZE(sta32x->supplies),
                                    sta32x->supplies);
        if (ret != 0) {