On 12/18/24 22:45, David Gow wrote:
On Tue, 17 Dec 2024 at 04:12, Brian Norris <[email protected]> wrote:

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) <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
---

Seems sensible enough to me.

Acked-by: David Gow <[email protected]>

I assume this series (including the KUnit test changes) will go in via Greg.


Works for me.

Acked-by: Shuah Khan <[email protected]>

thanks,
-- Shuah


Reply via email to