aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/rtsx_pcr.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-04-04 15:34:11 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2013-04-05 12:40:14 -0400
commit9d66b568a215fe2da2a9db736ebf9b8d66082d88 (patch)
treeb5dcd15e5ea4d683575ea5310cf0b1ae25923791 /drivers/mfd/rtsx_pcr.c
parent58eb893da99815ebdeee6cb3eeac897b99a246f7 (diff)
MFD: rtsx_pcr: Fix probe fail path
When rtsx_pci_acquire_irq fails in rtsx_pci_probe, we forget to disable an MSI (if we enabled it). This results in this warning on the next attempt to load the module: WARNING: at drivers/pci/msi.c:834 pci_enable_msi_block+0x2a4/0x2b0() Hardware name: HP EliteBook 840 G1 Modules linked in: rtsx_pci(+) ... Pid: 4056, comm: modprobe Tainted: G I 3.8.0-9405-gd895cb1-1-vanilla #1 Call Trace: [<ffffffff81045c6a>] warn_slowpath_common+0x7a/0xc0 [<ffffffff81045cc5>] warn_slowpath_null+0x15/0x20 [<ffffffff81302544>] pci_enable_msi_block+0x2a4/0x2b0 [<ffffffffa05e335a>] rtsx_pci_probe+0x55a/0x720 [rtsx_pci] ... So properly disable MSI in that case. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/rtsx_pcr.c')
-rw-r--r--drivers/mfd/rtsx_pcr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 2f12cc13489a..578a1136b6dc 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1138,7 +1138,7 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
1138 1138
1139 ret = rtsx_pci_acquire_irq(pcr); 1139 ret = rtsx_pci_acquire_irq(pcr);
1140 if (ret < 0) 1140 if (ret < 0)
1141 goto free_dma; 1141 goto disable_msi;
1142 1142
1143 pci_set_master(pcidev); 1143 pci_set_master(pcidev);
1144 synchronize_irq(pcr->irq); 1144 synchronize_irq(pcr->irq);
@@ -1162,7 +1162,9 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
1162 1162
1163disable_irq: 1163disable_irq:
1164 free_irq(pcr->irq, (void *)pcr); 1164 free_irq(pcr->irq, (void *)pcr);
1165free_dma: 1165disable_msi:
1166 if (pcr->msi_en)
1167 pci_disable_msi(pcr->pci);
1166 dma_free_coherent(&(pcr->pci->dev), RTSX_RESV_BUF_LEN, 1168 dma_free_coherent(&(pcr->pci->dev), RTSX_RESV_BUF_LEN,
1167 pcr->rtsx_resv_buf, pcr->rtsx_resv_buf_addr); 1169 pcr->rtsx_resv_buf, pcr->rtsx_resv_buf_addr);
1168unmap: 1170unmap: