diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2021-10-12 23:42:59 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-10-13 01:37:15 +0300 |
commit | 8e9028b3790ddb02c407e1a4da0ab7cf82790e7e (patch) | |
tree | 4d47d8f4146693c6a91f18b236d446a98da93ea2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | e4e737bb5c170df6135a127739a9e6148ee3da82 (diff) | |
download | linux-8e9028b3790ddb02c407e1a4da0ab7cf82790e7e.tar.xz |
PCI: Return NULL for to_pci_driver(NULL)
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: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions