PCI: endpoint: Return -EINVAL when interrupts num is smaller than 1
authorLi Chen <lchen@ambarella.com>
Tue, 21 Dec 2021 02:59:56 +0000 (02:59 +0000)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 7 Jan 2022 10:35:34 +0000 (10:35 +0000)
commit50b620303a14e885529410d26800f92a735724d6
treee68dd695cb65166256bb8796983ccc3b4b7cf30c
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
PCI: endpoint: Return -EINVAL when interrupts num is smaller than 1

In pci_epc_set_msi() we should return immediately if there are no
interrupts to configure; update the code to return early.

Link: https://lore.kernel.org/r/CH2PR19MB402491B9E503694DBCAC6005A07C9@CH2PR19MB4024.namprd19.prod.outlook.com
Signed-off-by: Li Chen <lchen@ambarella.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/pci/endpoint/pci-epc-core.c