Skip to content

Commit

Permalink
PCI/IOV: Tidy pci_sriov_set_totalvfs()
Browse files Browse the repository at this point in the history
Fix minor style issues in pci_sriov_set_totalvfs().  No functional change
intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Bjorn Helgaas committed Jul 19, 2018
1 parent 7ce3f91 commit 51259d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/iov.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,15 +802,15 @@ int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
{
if (!dev->is_physfn)
return -ENOSYS;

if (numvfs > dev->sriov->total_VFs)
return -EINVAL;

/* Shouldn't change if VFs already enabled */
if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
return -EBUSY;
else
dev->sriov->driver_max_VFs = numvfs;

dev->sriov->driver_max_VFs = numvfs;
return 0;
}
EXPORT_SYMBOL_GPL(pci_sriov_set_totalvfs);
Expand Down

0 comments on commit 51259d0

Please sign in to comment.