Skip to content

Commit

Permalink
stmmac: fix setting of driver data in stmmac_dvr_probe
Browse files Browse the repository at this point in the history
Commit 803f8fc ("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: 803f8fc ("stmmac: move driver data setting into stmmac_dvr_probe")
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joachim Eastwood authored and David S. Miller committed Jul 21, 2015
1 parent 053c26f commit a7a6268
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a7a6268

Please sign in to comment.