mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
gianfar: Handle error code at MAC address change
Handle return error code of eth_mac_addr();
Fixes: 3d23a05c75
("gianfar: Enable changing mac addr when if up")
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
63415767a2
commit
bff5b62585
@ -363,7 +363,11 @@ static void gfar_set_mac_for_addr(struct net_device *dev, int num,
|
||||
|
||||
static int gfar_set_mac_addr(struct net_device *dev, void *p)
|
||||
{
|
||||
eth_mac_addr(dev, p);
|
||||
int ret;
|
||||
|
||||
ret = eth_mac_addr(dev, p);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
gfar_set_mac_for_addr(dev, 0, dev->dev_addr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user