]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ALSA: asihpi: fix missing pci_disable_device()
authorLiu Shixin <liushixin2@huawei.com>
Sat, 26 Nov 2022 02:14:29 +0000 (10:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:07 +0000 (11:41 +0100)
[ Upstream commit 9d86515c3d4c0564a0c31a2df87d735353a1971e ]

pci_disable_device() need be called while module exiting, switch to use
pcim_enable(), pci_disable_device() will be called in pcim_release().

Fixes: 8159ecd29a49 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/asihpi/hpioctl.c

index 9790f5108a166859603ca0ff7c98a331f242a100..5cab049413fc9e6264307ebd503a32c77880584e 100644 (file)
@@ -352,7 +352,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;