提交 a7a62685 编写于 作者: J Joachim Eastwood 提交者: David S. Miller

stmmac: fix setting of driver data in stmmac_dvr_probe

Commit 803f8fc4 ("stmmac: move driver data setting into
stmmac_dvr_probe") mistakenly set priv and not priv->dev as
driver data. This meant that the remove, resume and suspend
callbacks that fetched and tried to use this data would most
likely explode. Fix the issue by using the correct variable.

Fixes: 803f8fc4 ("stmmac: move driver data setting into stmmac_dvr_probe")
Signed-off-by: NJoachim Eastwood <manabian@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 053c26f3
......@@ -2843,7 +2843,7 @@ int stmmac_dvr_probe(struct device *device,
if (res->mac)
memcpy(priv->dev->dev_addr, res->mac, ETH_ALEN);
dev_set_drvdata(device, priv);
dev_set_drvdata(device, priv->dev);
/* Verify driver arguments */
stmmac_verify_args();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册