Skip to content

Commit ed613d9

Browse files
claudiu-mgregkh
authored andcommitted
gianfar: Handle error code at MAC address change
[ Upstream commit bff5b62 ] Handle return error code of eth_mac_addr(); Fixes: 3d23a05 ("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>
1 parent 1eb5f4e commit ed613d9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/net/ethernet/freescale/gianfar.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,11 @@ static void gfar_set_mac_for_addr(struct net_device *dev, int num,
364364

365365
static int gfar_set_mac_addr(struct net_device *dev, void *p)
366366
{
367-
eth_mac_addr(dev, p);
367+
int ret;
368+
369+
ret = eth_mac_addr(dev, p);
370+
if (ret)
371+
return ret;
368372

369373
gfar_set_mac_for_addr(dev, 0, dev->dev_addr);
370374

0 commit comments

Comments
 (0)