This patch is not tested
---
fsl_msi_alloc_hwirqs() converts an int from bitmap_find_free_region()
into an irq_hw_number_t, but this can be an -ENOMEM. This is tested
in fsl_setup_msi_irqs(), but incorrectly: irq_hw_number_t is
unsigned.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 2c5187c..a2aa59a 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -67,7 +67,7 @@ static struct irq_host_ops fsl_msi_host_ops = {
.map = fsl_msi_host_map,
};
-static irq_hw_number_t fsl_msi_alloc_hwirqs(struct fsl_msi *msi, int num)
+static int fsl_msi_alloc_hwirqs(struct fsl_msi *msi, int num)
{
unsigned long flags;
int order = get_count_order(num);
@@ -205,13 +205,13 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
struct fsl_msi *msi_data = fsl_msi;
list_for_each_entry(entry, &pdev->msi_list, list) {
- hwirq = fsl_msi_alloc_hwirqs(msi_data, 1);
- if (hwirq < 0) {
- rc = hwirq;
+ rc = fsl_msi_alloc_hwirqs(msi_data, 1);
+ if (rc < 0) {
pr_debug("%s: fail allocating msi interrupt\n",
__func__);
goto out_free;
}
+ hwirq = rc;
virq = irq_create_mapping(msi_data->irqhost, hwirq);
--
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Martin Michlmayr | Network slowdown due to CFS |
git: | |
| Paweł Staszewski | rib_trie / Fix inflate_threshold_root. Now=15 size=11 bits |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
