Commit 30246046 authored by Christian Unhold's avatar Christian Unhold

Fix a Linux crash when pci_msix_vec_count() returns -EINVAL

Also described in https://github.com/Xilinx/dma_ip_drivers/issues/45
parent ac1c9e2e
...@@ -532,7 +532,7 @@ int intr_setup(struct xlnx_dma_dev *xdev) ...@@ -532,7 +532,7 @@ int intr_setup(struct xlnx_dma_dev *xdev)
pr_debug("dev %s, xdev->num_vecs = %d\n", pr_debug("dev %s, xdev->num_vecs = %d\n",
dev_name(&xdev->conf.pdev->dev), xdev->num_vecs); dev_name(&xdev->conf.pdev->dev), xdev->num_vecs);
if (num_vecs == 0) { if (num_vecs <= 0) {
pr_warn("MSI-X not supported, running in polled mode\n"); pr_warn("MSI-X not supported, running in polled mode\n");
return 0; return 0;
} }
......
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