[PATCH net v4 3/4] net: ethernet: oa_tc6: mdiobus->parent initialized with NULL

From: Selvamani Rajagopal via B4 Relay

Date: Tue Jun 09 2026 - 15:54:17 EST


From: Selvamani Rajagopal <Selvamani.Rajagopal@xxxxxxxxxx>

As "dev" pointer in oa_tc6 structure is never initialized,
mbiosub->parent was initialized with NULL. This change
fixes the issue.

Fixes: 2c6ce5354453 ("net: ethernet: oa_tc6: implement mac-phy interrupt")
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@xxxxxxxxxx>

Changes in v4:
new patch
---
drivers/net/ethernet/oa_tc6.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c
index 20c9e98d1d60..0710a5a8dcde 100644
--- a/drivers/net/ethernet/oa_tc6.c
+++ b/drivers/net/ethernet/oa_tc6.c
@@ -108,7 +108,6 @@

/* Internal structure for MAC-PHY drivers */
struct oa_tc6 {
- struct device *dev;
struct net_device *netdev;
struct phy_device *phydev;
struct mii_bus *mdiobus;
@@ -517,7 +516,7 @@ static int oa_tc6_mdiobus_register(struct oa_tc6 *tc6)
tc6->mdiobus->read_c45 = oa_tc6_mdiobus_read_c45;
tc6->mdiobus->write_c45 = oa_tc6_mdiobus_write_c45;
tc6->mdiobus->name = "oa-tc6-mdiobus";
- tc6->mdiobus->parent = tc6->dev;
+ tc6->mdiobus->parent = &tc6->spi->dev;

snprintf(tc6->mdiobus->id, ARRAY_SIZE(tc6->mdiobus->id), "%s",
dev_name(&tc6->spi->dev));

--
2.43.0