Skip to content

Commit 0c679ff

Browse files
andy-shevlag-linaro
authored andcommitted
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: e6951fb ("mfd: intel-lpss: Use PCI APIs instead of dereferencing") Reported-by: Heikki Krogerus <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 7a29fa0 commit 0c679ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/intel-lpss-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
4444
return ret;
4545

4646
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY);
47-
if (ret)
47+
if (ret < 0)
4848
return ret;
4949

5050
info = devm_kmemdup(&pdev->dev, data, sizeof(*info), GFP_KERNEL);

0 commit comments

Comments
 (0)