Skip to content

Commit 8ec5db6

Browse files
Alexander Gordeevbjorn-helgaas
authored andcommitted
PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1
Suggested-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Tejun Heo <tj@kernel.org>
1 parent 2adc790 commit 8ec5db6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/linux/pci.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,13 +1156,13 @@ struct msix_entry {
11561156
#ifndef CONFIG_PCI_MSI
11571157
static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec)
11581158
{
1159-
return -1;
1159+
return -ENOSYS;
11601160
}
11611161

11621162
static inline int
11631163
pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec)
11641164
{
1165-
return -1;
1165+
return -ENOSYS;
11661166
}
11671167

11681168
static inline void pci_msi_shutdown(struct pci_dev *dev)
@@ -1177,7 +1177,7 @@ static inline int pci_msix_table_size(struct pci_dev *dev)
11771177
static inline int pci_enable_msix(struct pci_dev *dev,
11781178
struct msix_entry *entries, int nvec)
11791179
{
1180-
return -1;
1180+
return -ENOSYS;
11811181
}
11821182

11831183
static inline void pci_msix_shutdown(struct pci_dev *dev)

0 commit comments

Comments
 (0)