diff options
| author | Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com> | 2026-06-12 00:55:39 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-16 02:32:09 +0300 |
| commit | a221d3f7e3f3ea6a3b4bc511cf2a59242daa06e1 (patch) | |
| tree | 66bffa1afe50fba5d8456cba731af4d2c7ee4cca | |
| parent | b542d13fab0f556660ce5f10179fb3ae66bdb9a4 (diff) | |
| download | linux-a221d3f7e3f3ea6a3b4bc511cf2a59242daa06e1.tar.xz | |
net: ethernet: oa_tc6: mdiobus->parent initialized with NULL
As "dev" pointer in oa_tc6 structure is never initialized,
mbiobus->parent was initialized with NULL. This change
fixes it by initializing it with device pointer of spi.
Fixes: 8f9bf857e43b ("net: ethernet: oa_tc6: implement internal PHY initialization")
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Link: https://patch.msgid.link/20260611-level-trigger-v5-2-4533a9e85ce2@onsemi.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/oa_tc6.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/oa_tc6.c b/drivers/net/ethernet/oa_tc6.c index f3ac2875adfb..477ceefde2c5 100644 --- a/drivers/net/ethernet/oa_tc6.c +++ b/drivers/net/ethernet/oa_tc6.c @@ -110,7 +110,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; @@ -520,7 +519,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)); |
