• Bjorn Helgaas's avatar
    PCI: hotplug: Remove unnecessary "dev->bus" test · 8e56aed0
    Bjorn Helgaas authored
    Every pci_dev is on a valid pci_bus, so we don't need to test whether
    dev->bus is NULL or not.
    
    The only exceptions are a few legacy cases like alpha_core_agp_setup(),
    parisc_agp_setup(), and megaraid's make_local_pdev(), where we allocate a
    pci_dev with a NULL bus pointer.  These are dubious uses (especially the
    megaraid one), and I don't think it's possible to exercise this
    pci_configure_slot() path with any of them.
    
    Found by Coverity (CID 146446).
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    8e56aed0
pcihp_slot.c 5.31 KB