Skip to content

Commit d4b4da9

Browse files
dcpleungkartben
authored andcommitted
x86: fix return for arch_pcie_msi_vectors_allocate()
arch_pcie_msi_vectors_allocate() has a return type of uint8_t. One of the error path returns -1 which would result in 255 being returned. So fix that by returning 0 instead, as there is no vector being allocated anyway. Signed-off-by: Daniel Leung <[email protected]>
1 parent bf892ff commit d4b4da9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/core/pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ uint8_t arch_pcie_msi_vectors_allocate(unsigned int priority,
260260
}
261261

262262
if ((irq == PCIE_CONF_INTR_IRQ_NONE) || (irq == -1)) {
263-
return -1;
263+
return 0;
264264
}
265265

266266
vector = z_x86_allocate_vector(priority, prev_vector);

0 commit comments

Comments
 (0)