]> git.karo-electronics.de Git - linux-beck.git/commitdiff
misc: mei: Disable MSI when IRQ registration fails
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 11 Jun 2012 09:18:30 +0000 (12:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Jun 2012 22:34:31 +0000 (15:34 -0700)
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>
drivers/misc/mei/main.c

index a5a17e78a96cdabc590091b3c5fcbf15acf844f1..7de13891e49e8f2c788ad2e7ca274f257e1c41f5 100644 (file)
@@ -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);