PCI: Check for pci_setup_device() failure in pci_iov_add_virtfn()

If pci_setup_device() returns failure, we must return failure from
pci_iov_add_virtfn().  If we ignore the failure and continue with an
uninitialized pci_dev for virtfn, we crash later when we try to use those
uninitialized parts.

Signed-off-by: Po Liu <po.liu@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 file changed