Skip to content

Commit bff5b62

Browse files
claudiu-mdavem330
authored andcommitted
gianfar: Handle error code at MAC address change
Handle return error code of eth_mac_addr(); Fixes: 3d23a05 ("gianfar: Enable changing mac addr when if up") Signed-off-by: Claudiu Manoil <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6341576 commit bff5b62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/freescale/gianfar.c

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

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

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

0 commit comments

Comments
 (0)