[PATCH 2/3] net: davinci_mdio: initialize priv->dev

Sascha Hauer s.hauer at pengutronix.de
Wed Nov 13 00:29:28 PST 2024


struct cpsw_mdio_priv has a struct device *dev member which is used, but
never initialized. Add the missing initialization.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/net/davinci_mdio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/davinci_mdio.c b/drivers/net/davinci_mdio.c
index fad14e92ea..ef08911f3f 100644
--- a/drivers/net/davinci_mdio.c
+++ b/drivers/net/davinci_mdio.c
@@ -113,6 +113,7 @@ static int cpsw_mdio_probe(struct device *dev)
 	int ret;
 
 	priv = xzalloc(sizeof(*priv));
+	priv->dev = dev;
 
 	/* If we can't request I/O memory region, we'll assume parent did
 	 * it for us

-- 
2.39.5




More information about the barebox mailing list