Commit 6d13f62d authored by Lukas Wunner's avatar Lukas Wunner Committed by Mark Brown

ASoC: Intel: Skylake: Always acquire runtime pm ref on unload

skl_probe() releases a runtime pm ref unconditionally wheras
skl_remove() acquires one only if the device is wakeup capable.
Thus if the device is not wakeup capable, unloading and reloading
the module will result in the refcount being decreased below 0.
Fix it.

Fixes: d8c2dab8 ("ASoC: Intel: Add Skylake HDA audio driver")
Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 46904810
...@@ -785,8 +785,7 @@ static void skl_remove(struct pci_dev *pci) ...@@ -785,8 +785,7 @@ static void skl_remove(struct pci_dev *pci)
release_firmware(skl->tplg); release_firmware(skl->tplg);
if (pci_dev_run_wake(pci)) pm_runtime_get_noresume(&pci->dev);
pm_runtime_get_noresume(&pci->dev);
/* codec removal, invoke bus_device_remove */ /* codec removal, invoke bus_device_remove */
snd_hdac_ext_bus_device_remove(ebus); snd_hdac_ext_bus_device_remove(ebus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment