Commit 169dc388 authored by Samuel Ortiz's avatar Samuel Ortiz Committed by Greg Kroah-Hartman

misc: mei: Disable MSI when IRQ registration fails

Since MSI is enabled right before that, we should disable it when
registration fails.
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e69d64a
...@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev, ...@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
if (err) { if (err) {
dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
pdev->irq); pdev->irq);
goto unmap_memory; goto disable_msi;
} }
INIT_DELAYED_WORK(&dev->timer_work, mei_timer); INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
if (mei_hw_init(dev)) { if (mei_hw_init(dev)) {
...@@ -1023,8 +1023,8 @@ static int __devinit mei_probe(struct pci_dev *pdev, ...@@ -1023,8 +1023,8 @@ static int __devinit mei_probe(struct pci_dev *pdev,
mei_disable_interrupts(dev); mei_disable_interrupts(dev);
flush_scheduled_work(); flush_scheduled_work();
free_irq(pdev->irq, dev); free_irq(pdev->irq, dev);
disable_msi:
pci_disable_msi(pdev); pci_disable_msi(pdev);
unmap_memory:
pci_iounmap(pdev, dev->mem_addr); pci_iounmap(pdev, dev->mem_addr);
free_device: free_device:
kfree(dev); kfree(dev);
......
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