diff options
author | Claudiu Manoil <claudiu.manoil@nxp.com> | 2021-03-29 17:08:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-29 23:45:41 +0300 |
commit | bff5b62585123823842833ab20b1c0a7fa437f8c (patch) | |
tree | afd018465606c7a8160598fdb6fb5c8c4a3df1ac /drivers | |
parent | 63415767a2446136372e777cde5bb351f21ec21d (diff) | |
download | linux-bff5b62585123823842833ab20b1c0a7fa437f8c.tar.xz |
gianfar: Handle error code at MAC address change
Handle return error code of eth_mac_addr();
Fixes: 3d23a05c75c7 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 1cf8ef717453..3ec4d9fddd52 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -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); |