summaryrefslogtreecommitdiff
path: root/drivers/pci/msi/msi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/msi/msi.c')
-rw-r--r--drivers/pci/msi/msi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 682fa877478f..748af066f424 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -421,8 +421,10 @@ int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
if (maxvec < minvec)
return -ERANGE;
- if (WARN_ON_ONCE(dev->msi_enabled))
+ if (dev->msi_enabled) {
+ pci_info(dev, "can't enable MSI, already enabled\n");
return -EINVAL;
+ }
nvec = pci_msi_vec_count(dev);
if (nvec < 0)