Re: [PATCH v2] phy: ti: j721e-wiz: Fix device node reference leak in wiz_get_lane_phy_types()

From: Vladimir Oltean

Date: Fri Feb 13 2026 - 07:38:15 EST


On Fri, Feb 13, 2026 at 09:09:55AM +0100, Markus Elfring wrote:
>
> > ---
> > Changes in v2:
> > - Use of_node_put() suggested by Vladimir Oltean.
> > - Link to v1: https://lore.kernel.org/r/20260211-wiz-v1-1-fdd018d02f33@xxxxxxxxx
> > ---
> > drivers/phy/ti/phy-j721e-wiz.c | 2 ++
>
>
> * Would you like to complete the exception handling by using another goto chain?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v6.19#n526

While gotos have their place, here it seems simpler not to use them.
Felix would have needed to move the "int ret" variable from the
for_each_child_of_node_scoped() scope to the function scope, and
initialize it with 0. All that is unnecessary complexity here.

> * How do you think about to increase the application of scope-based resource management
> by additional update steps?
> https://elixir.bootlin.com/linux/v6.19-rc5/source/include/linux/cleanup.h#L157-L161

The cleanup.h API does not exist in all kernels where this bug fix can
be backported.