Skip to content

Commit

Permalink
misc: mei: Disable MSI when IRQ registration fails
Browse files Browse the repository at this point in the history
Since MSI is enabled right before that, we should disable it when
registration fails.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Samuel Ortiz authored and Greg Kroah-Hartman committed Jun 13, 2012
1 parent 1e69d64 commit 169dc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/misc/mei/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
if (err) {
dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
pdev->irq);
goto unmap_memory;
goto disable_msi;
}
INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
if (mei_hw_init(dev)) {
Expand Down Expand Up @@ -1023,8 +1023,8 @@ static int __devinit mei_probe(struct pci_dev *pdev,
mei_disable_interrupts(dev);
flush_scheduled_work();
free_irq(pdev->irq, dev);
disable_msi:
pci_disable_msi(pdev);
unmap_memory:
pci_iounmap(pdev, dev->mem_addr);
free_device:
kfree(dev);
Expand Down

0 comments on commit 169dc38

Please sign in to comment.