]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Check for pci_setup_device() failure in pci_iov_add_virtfn()
authorPo Liu <po.liu@nxp.com>
Mon, 29 Aug 2016 07:28:01 +0000 (15:28 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 12 Sep 2016 21:23:38 +0000 (16:23 -0500)
commit199f2acce8cc7b219a9f868b8086f039e4e2ce65
tree2a9d74672916907e1ebd627a731fd0609aeaba39
parent3332eaffbed5592b03fff28b45847e958776ef9d
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>
drivers/pci/iov.c