]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: cs35l56: Destroy workqueue in probe error path
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 5 May 2026 16:11:24 +0000 (17:11 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 6 May 2026 12:22:51 +0000 (21:22 +0900)
The error path in cs35l56_common_probe() should call destroy_workqueue()
on the workqueue that was created by cs35l56_dsp_init().

Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260505161124.3621000-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56.c

index e847bb32af2e0a72ab753073f177ab9afef6e21b..849d70ca23d6f544991f68046fceca3a99593e74 100644 (file)
@@ -1970,6 +1970,9 @@ err:
        gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 0);
        regulator_bulk_disable(ARRAY_SIZE(cs35l56->supplies), cs35l56->supplies);
 
+       if (cs35l56->dsp_wq)
+               destroy_workqueue(cs35l56->dsp_wq);
+
        return ret;
 }
 EXPORT_SYMBOL_NS_GPL(cs35l56_common_probe, "SND_SOC_CS35L56_CORE");