Commit 28b75189 authored by Bjorn Helgaas's avatar Bjorn Helgaas

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
parents 2948ce70 50b62030
...@@ -334,7 +334,7 @@ int pci_epc_set_msi(struct pci_epc *epc, u8 func_no, u8 vfunc_no, u8 interrupts) ...@@ -334,7 +334,7 @@ int pci_epc_set_msi(struct pci_epc *epc, u8 func_no, u8 vfunc_no, u8 interrupts)
u8 encode_int; u8 encode_int;
if (IS_ERR_OR_NULL(epc) || func_no >= epc->max_functions || if (IS_ERR_OR_NULL(epc) || func_no >= epc->max_functions ||
interrupts > 32) interrupts < 1 || interrupts > 32)
return -EINVAL; return -EINVAL;
if (vfunc_no > 0 && (!epc->max_vfs || vfunc_no > epc->max_vfs[func_no])) if (vfunc_no > 0 && (!epc->max_vfs || vfunc_no > epc->max_vfs[func_no]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment