Re: [PATCH] driver core: Don't match device with NULL of_node/fwnode
From: Greg Kroah-Hartman
Date: Wed Dec 04 2024 - 04:37:15 EST
On Tue, Dec 03, 2024 at 06:02:59PM -0600, Rob Herring (Arm) wrote:
> It recently came up that of_find_device_by_node() will match a device
> with a NULL of_node pointer. This is not desired behavior. The returned
> struct device is also not deterministic.
It's not deterministic because a NULL pointer will cause that to happen,
or for some other reason?
> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
> ---
> It would be a bit more efficient to check this up front before we
> iterate thru devices, but there's a number of users of these functions
> and this isn't really a hot path.
Yeah, this should be fine. Does this fix a problem now and we need it
merged for 6.13-final and backported, or can it just wait for 6.14-rc1?
thanks,
greg k-h