Re: [PATCH v2] drivers/base/node: Handle error properly in register_one_node()

From: David Hildenbrand
Date: Fri Aug 22 2025 - 05:54:41 EST


On 22.08.25 10:48, Donet Tom wrote:
If register_node() returns an error, it is not handled correctly.
The function will proceed further and try to register CPUs under the
node, which is not correct.

So, in this patch, if register_node() returns an error, we return
immediately from the function.

Fixes: 76b67ed9dce6 ("[PATCH] node hotplug: register cpu: remove node struct")
Signed-off-by: Donet Tom <donettom@xxxxxxxxxxxxx>
---

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers

David / dhildenb