]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
PCI: Remove VFs in reverse order if virtfn_add() fails
authorAlexander Duyck <aduyck@mirantis.com>
Thu, 29 Oct 2015 21:21:05 +0000 (16:21 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 30 Oct 2015 20:14:00 +0000 (15:14 -0500)
commit3443c38205330bc5783a516ef1d0b6f182ee9a85
tree7cf2f33097b52949218d1d5c6292938695394f97
parentce288ec380380f3ab0e3c631b9c2f598835a3f38
PCI: Remove VFs in reverse order if virtfn_add() fails

If virtfn_add() fails, we call virtfn_remove() for any previously added
devices.  Remove the devices in reverse order (first-added is
last-removed), which is more natural and doesn't require an additional
variable.

[bhelgaas: changelog, split to separate patch for reviewability]
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Wei Yang <weiyang@linux.vnet.ibm.com>
drivers/pci/iov.c