Skip to content

Commit

Permalink
ASoC: Intel: Skylake: Always acquire runtime pm ref on unload
Browse files Browse the repository at this point in the history
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: d8c2dab ("ASoC: Intel: Add Skylake HDA audio driver")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Lukas Wunner authored and Mark Brown committed Oct 24, 2016
1 parent 4690481 commit 6d13f62
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/intel/skylake/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6d13f62

Please sign in to comment.