1
0
Fork 0

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: d8c2dab838 ("ASoC: Intel: Add Skylake HDA audio driver")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
hifive-unleashed-5.1
Lukas Wunner 2016-10-20 12:26:16 +02:00 committed by Mark Brown
parent 4690481060
commit 6d13f62d93
1 changed files with 1 additions and 2 deletions

View File

@ -785,8 +785,7 @@ static void skl_remove(struct pci_dev *pci)
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 */
snd_hdac_ext_bus_device_remove(ebus);