ALSA: asihpi: fix missing pci_disable_device()
authorLiu Shixin <liushixin2@huawei.com>
Sat, 26 Nov 2022 02:14:29 +0000 (10:14 +0800)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Nov 2022 13:52:06 +0000 (14:52 +0100)
pci_disable_device() need be called while module exiting, switch to use
pcim_enable(), pci_disable_device() will be called in pcim_release().

Fixes: 3285ea10e9b0 ("ALSA: asihpi - Interrelated HPI tidy up.")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20221126021429.3029562-1-liushixin2@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/hpioctl.c

index bb31b7fe867d6b51e11bcff5fee9bca4247eb4ac..477a5b4b50bcbf98b43be6354a55c035fbe61fca 100644 (file)
@@ -361,7 +361,7 @@ int asihpi_adapter_probe(struct pci_dev *pci_dev,
                pci_dev->device, pci_dev->subsystem_vendor,
                pci_dev->subsystem_device, pci_dev->devfn);
 
-       if (pci_enable_device(pci_dev) < 0) {
+       if (pcim_enable_device(pci_dev) < 0) {
                dev_err(&pci_dev->dev,
                        "pci_enable_device failed, disabling device\n");
                return -EIO;