Commit 0c679fff authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors()

The pci_alloc_irq_vectors() returns a positive number on success.
Hence we have to filter the negative numbers for error condition.
Update the check accordingly.

Fixes: e6951fb78787 ("mfd: intel-lpss: Use PCI APIs instead of dereferencing")
Reported-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20231130143206.1475831-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 7a29fa05
...@@ -44,7 +44,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev, ...@@ -44,7 +44,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
return ret; return ret;
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY); ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY);
if (ret) if (ret < 0)
return ret; return ret;
info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL); info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment