• B
    PCI: Return NULL for to_pci_driver(NULL) · 8e9028b3
    Bjorn Helgaas 提交于
    to_pci_driver() takes a pointer to a struct device_driver and uses
    container_of() to find the struct pci_driver that contains it.
    
    If given a NULL pointer to a struct device_driver, return a NULL pci_driver
    pointer instead of applying container_of() to NULL.
    
    This simplifies callers that would otherwise have to check for a NULL
    pointer first.
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    8e9028b3
pci.h 88.8 KB