summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-06-11 12:18:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-13 15:34:31 -0700
commit169dc388685f8a1c1e09546882a114ac850a5d6b (patch)
tree22059fbda8271f1528da606253fe64af33bbe158 /drivers/misc
parent1e69d64a28cf3cabd095ada3a49f081c97f997dd (diff)
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: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index a5a17e78a96c..7de13891e49e 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -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)) {
@@ -1023,8 +1023,8 @@ release_irq:
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);