Skip to content

Commit 28b7518

Browse files
committed
Merge branch 'remotes/lorenzo/pci/endpoint'
- Return failure from pci_epc_set_msi() if no interrupts are available (Li Chen) * remotes/lorenzo/pci/endpoint: PCI: endpoint: Return -EINVAL when interrupts num is smaller than 1
2 parents 2948ce7 + 50b6203 commit 28b7518

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/pci-epc-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ int pci_epc_set_msi(struct pci_epc *epc, u8 func_no, u8 vfunc_no, u8 interrupts)
334334
u8 encode_int;
335335

336336
if (IS_ERR_OR_NULL(epc) || func_no >= epc->max_functions ||
337-
interrupts > 32)
337+
interrupts < 1 || interrupts > 32)
338338
return -EINVAL;
339339

340340
if (vfunc_no > 0 && (!epc->max_vfs || vfunc_no > epc->max_vfs[func_no]))

0 commit comments

Comments
 (0)