diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2007-03-25 20:38:42 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2007-03-29 18:02:58 -0400 |
commit | 8a3a0ee736b9a0150c9d894f2c6cc836a62125a1 (patch) | |
tree | fb98ffc7f346bead619a31c08012234131bee7c9 /arch/ia64 | |
parent | a76c0b976310bbb1b6eaecaaae465af194134477 (diff) |
[IA64] Fix possible invalid memory access in ia64_setup_msi_irq()
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>
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/msi_ia64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index e7220900ea14..ebbeadfee42d 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c | |||
@@ -68,7 +68,7 @@ int ia64_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) | |||
68 | { | 68 | { |
69 | struct msi_msg msg; | 69 | struct msi_msg msg; |
70 | unsigned long dest_phys_id; | 70 | unsigned long dest_phys_id; |
71 | unsigned int irq, vector; | 71 | int irq, vector; |
72 | 72 | ||
73 | irq = create_irq(); | 73 | irq = create_irq(); |
74 | if (irq < 0) | 74 | if (irq < 0) |