Re: [PATCH v2] drivers/base/node: fix UAF on device_register() failure
From: Linkai Gong
Date: Sun Sep 06 2026 - 22:42:48 EST
On Fri, Aug 28, 2026 at 08:07:19PM +0200, Danilo Krummrich wrote:
> Sorry I didn't notice this in the first version, but why do we keep the goto
> labels at all if they both end with a return statement? Can't we just get rid of
> both?
You are right. Both labels only return, so the gotos are not needed.
I will send a v3 that inlines the two error paths.
Thanks,
Linkai