mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: codecs: wsa884x: disable runtime PM on unbind
Probe enables runtime PM but nothing disables it on unbind. The pending
autosuspend then runs wsa884x_runtime_suspend() after the devm-managed
regmap is freed, and dereferences NULL:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
pc : regcache_cache_only+0x18/0x80
lr : wsa884x_runtime_suspend+0x24/0x40 [snd_soc_wsa884x]
Use devm_pm_runtime_enable() so runtime PM is disabled before the regmap
is freed.
Fixes: aa21a7d4f6 ("ASoC: codecs: wsa884x: Add WSA884x family of speakers")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20261023171316.819857-5-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6a55cf0d9d
commit
54c121eaee
|
|
@ -2125,7 +2125,9 @@ static int wsa884x_probe(struct sdw_slave *pdev,
|
|||
pm_runtime_use_autosuspend(dev);
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return devm_snd_soc_register_component(dev,
|
||||
&wsa884x_component_drv,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user