[IA64] Fix possible invalid memory access in ia64_setup_msi_irq()
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Mon, 26 Mar 2007 00:38:42 +0000 (09:38 +0900)
committerTony Luck <tony.luck@intel.com>
Thu, 29 Mar 2007 22:02:58 +0000 (15:02 -0700)
The following 'if' statement in ia64_setup_msi_irq() always fails even
if create_irq() returns <0 value, because variable 'irq' is defined as
unsigned int. It would cause invalid memory access.

        irq = create_irq();
        if (irq < 0)
                return irq;

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/msi_ia64.c

index e722090..ebbeadf 100644 (file)
@@ -68,7 +68,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
 {
        struct msi_msg  msg;
        unsigned long   dest_phys_id;
-       unsigned int    irq, vector;
+       int     irq, vector;
 
        irq = create_irq();
        if (irq < 0)