aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/qlcnic/qlcnic_hw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index 10ba72302fc9..ad124254b6a9 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -413,10 +413,15 @@ static int qlcnic_nic_add_mac(struct qlcnic_adapter *adapter, u8 *addr)
413 return -ENOMEM; 413 return -ENOMEM;
414 } 414 }
415 memcpy(cur->mac_addr, addr, ETH_ALEN); 415 memcpy(cur->mac_addr, addr, ETH_ALEN);
416 list_add_tail(&cur->list, &adapter->mac_list);
417 416
418 return qlcnic_sre_macaddr_change(adapter, 417 if (qlcnic_sre_macaddr_change(adapter,
419 cur->mac_addr, QLCNIC_MAC_ADD); 418 cur->mac_addr, QLCNIC_MAC_ADD)) {
419 kfree(cur);
420 return -EIO;
421 }
422
423 list_add_tail(&cur->list, &adapter->mac_list);
424 return 0;
420} 425}
421 426
422void qlcnic_set_multi(struct net_device *netdev) 427void qlcnic_set_multi(struct net_device *netdev)