mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
gianfar: Handle error code at MAC address change
[ Upstream commitbff5b62585] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a3210f911e
commit
6157a79cdc
@@ -485,7 +485,11 @@ static struct net_device_stats *gfar_get_stats(struct net_device *dev)
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user