Re: [PATCH] net: renesas: rswitch: Fix memory leak in rswitch_phy_device_init()

From: Nikita Yushchenko

Date: Mon Mar 30 2026 - 03:59:44 EST


- phydev = of_phy_find_device(phy);
- if (!phydev)
+ tmp_phydev = of_phy_find_device(phy);
+ if (!tmp_phydev)
goto out;
- __set_bit(rdev->etha->phy_interface, phydev->host_interfaces);
+ __set_bit(rdev->etha->phy_interface, tmp_phydev->host_interfaces);
phydev->mac_managed_pm = true;

shall be tmp_phydev ?