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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux