Re: [PATCH] kunit: unregister software node when fwnode lookup fails
From: Bartosz Golaszewski
Date: Tue Nov 17 2026 - 09:16:19 EST
On Tue, Nov 17, 2026 at 06:07:23PM +0800, Jiangshan Yi wrote:
> If software_node_fwnode() returns NULL right after a successful
> software_node_register(), the error path leaves the node registered
> with no cleanup. Unregister it before returning the error to match
> the behaviour of the other helpers in this file.
>
> Fixes: 9fdbdb528488 ("kunit: provide a set of fwnode-oriented helpers")
> Signed-off-by: Jiangshan Yi <yijiangshan@xxxxxxxxxx>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>