diff options
author | Roel Kluin <12o3l@tiscali.nl> | 2008-04-24 08:32:26 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-05-14 22:31:20 +1000 |
commit | ee1a08f963c5abb5ec2d8c5defffecee7c3f84c8 (patch) | |
tree | 12e3292fac87390be4b21b5dc72fbce21bbf882b /arch/powerpc/sysdev/mpic_pasemi_msi.c | |
parent | 54ef0ec22a39071a4e7fbedd201cecac9ac6e8a7 (diff) | |
download | op-kernel-dev-ee1a08f963c5abb5ec2d8c5defffecee7c3f84c8.zip op-kernel-dev-ee1a08f963c5abb5ec2d8c5defffecee7c3f84c8.tar.gz |
[POWERPC] mpic_pasemi_msi: Failed allocation unnoticed
bitmap_find_free_region(), called by mpic_msi_alloc_hwirqs() may return
signed, but hwirq is unsigned. A failed allocation remains unnoticed.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/mpic_pasemi_msi.c')
-rw-r--r-- | arch/powerpc/sysdev/mpic_pasemi_msi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/mpic_pasemi_msi.c b/arch/powerpc/sysdev/mpic_pasemi_msi.c index 33cbfb2..68aff60 100644 --- a/arch/powerpc/sysdev/mpic_pasemi_msi.c +++ b/arch/powerpc/sysdev/mpic_pasemi_msi.c @@ -95,6 +95,7 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) unsigned int virq; struct msi_desc *entry; struct msi_msg msg; + int ret; pr_debug("pasemi_msi_setup_msi_irqs, pdev %p nvec %d type %d\n", pdev, nvec, type); @@ -108,8 +109,9 @@ static int pasemi_msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type) * few MSIs for someone, but restrictions will apply to how the * sources can be changed independently. */ - hwirq = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK); - if (hwirq < 0) { + ret = mpic_msi_alloc_hwirqs(msi_mpic, ALLOC_CHUNK); + hwirq = ret; + if (ret < 0) { pr_debug("pasemi_msi: failed allocating hwirq\n"); return hwirq; } |