Skip to content

Commit

Permalink
PCI/MSI: Return -ENOSYS for unimplemented interfaces, not -1
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Gordeev authored and Bjorn Helgaas committed Dec 20, 2013
1 parent 2adc790 commit 8ec5db6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -1156,13 +1156,13 @@ struct msix_entry {
#ifndef CONFIG_PCI_MSI
static inline int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec)
{
return -1;
return -ENOSYS;
}

static inline int
pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec)
{
return -1;
return -ENOSYS;
}

static inline void pci_msi_shutdown(struct pci_dev *dev)
Expand All @@ -1177,7 +1177,7 @@ static inline int pci_msix_table_size(struct pci_dev *dev)
static inline int pci_enable_msix(struct pci_dev *dev,
struct msix_entry *entries, int nvec)
{
return -1;
return -ENOSYS;
}

static inline void pci_msix_shutdown(struct pci_dev *dev)
Expand Down

0 comments on commit 8ec5db6

Please sign in to comment.