aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/rust/kernel/pci.rs
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2024-12-16 12:11:42 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-24 09:48:09 +0100
commit1b1bb7b29b1052e4124c0f99eff65200ef141caf (patch)
treede1a15c1dc275e48591f478a6792db0c91d1d50e /rust/kernel/pci.rs
parentkheaders: Simplify attribute through __BIN_ATTR_SIMPLE_RO() (diff)
downloadwireguard-linux-1b1bb7b29b1052e4124c0f99eff65200ef141caf.tar.xz
wireguard-linux-1b1bb7b29b1052e4124c0f99eff65200ef141caf.zip
drivers: base: Don't match devices with NULL of_node/fwnode/etc
of_find_device_by_node(), bus_find_device_by_of_node(), bus_find_device_by_fwnode(), ..., all produce arbitrary results when provided with a NULL of_node, fwnode, ACPI handle, etc. This is counterintuitive, and the source of a few bugs, such as the one fixed by commit 5c8418cf4025 ("PCI/pwrctrl: Unregister platform device only if one actually exists"). It's hard to imagine a good reason that these device_match_*() APIs should return 'true' for a NULL argument. Augment these to return 0 (false). Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: David Gow <davidgow@google.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20241216201148.535115-2-briannorris@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/kernel/pci.rs')
0 files changed, 0 insertions, 0 deletions