summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tas2781-i2c.c
diff options
context:
space:
mode:
authorGergo Koteles <soyer@irl.hu>2024-02-04 21:01:17 +0100
committerMark Brown <broonie@kernel.org>2024-02-05 15:31:37 +0100
commit34a1066981a967eab619938e7b35a9be6b4c34e1 (patch)
treebc8a3955ff49aba458888b3c4c54436340217612 /sound/soc/codecs/tas2781-i2c.c
parentASoC: Intel: avs: Fix pci_probe() error path (diff)
downloadlinux-34a1066981a967eab619938e7b35a9be6b4c34e1.tar.xz
linux-34a1066981a967eab619938e7b35a9be6b4c34e1.zip
ASoC: tas2781: add module parameter to tascodec_init()
The tascodec_init() of the snd-soc-tas2781-comlib module is called from snd-soc-tas2781-i2c and snd-hda-scodec-tas2781-i2c modules. It calls request_firmware_nowait() with parameter THIS_MODULE and a cont/callback from the latter modules. The latter modules can be removed while their callbacks are running, resulting in a general protection failure. Add module parameter to tascodec_init() so request_firmware_nowait() can be called with the module of the callback. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles <soyer@irl.hu> Link: https://lore.kernel.org/r/118dad922cef50525e5aab09badef2fa0eb796e5.1707076603.git.soyer@irl.hu Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tas2781-i2c.c')
-rw-r--r--sound/soc/codecs/tas2781-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 32913bd1a623..b5abff230e43 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -566,7 +566,7 @@ static int tasdevice_codec_probe(struct snd_soc_component *codec)
{
struct tasdevice_priv *tas_priv = snd_soc_component_get_drvdata(codec);
- return tascodec_init(tas_priv, codec, tasdevice_fw_ready);
+ return tascodec_init(tas_priv, codec, THIS_MODULE, tasdevice_fw_ready);
}
static void tasdevice_deinit(void *context)