From 25b90c19102f50ae261cbc328361c0fc66b7c901 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Mon, 11 Oct 2021 06:09:09 -0700 Subject: tulip: fix setting device address from rom I missed removing i from the array index when converting from a loop to a direct copy. Fixes: ca8793175564 ("ethernet: tulip: remove direct netdev->dev_addr writes") Reported-by: Joe Perches Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller --- drivers/net/ethernet/dec/tulip/de2104x.c | 2 +- drivers/net/ethernet/dec/tulip/dmfe.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/ethernet/dec/tulip') diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index 1e3c90c3c0ed..d51b3d24a0c8 100644 --- a/drivers/net/ethernet/dec/tulip/de2104x.c +++ b/drivers/net/ethernet/dec/tulip/de2104x.c @@ -1823,7 +1823,7 @@ static void de21041_get_srom_info(struct de_private *de) #endif /* store MAC address */ - eth_hw_addr_set(de->dev, &ee_data[i + sa_offset]); + eth_hw_addr_set(de->dev, &ee_data[sa_offset]); /* get offset of controller 0 info leaf. ignore 2nd byte. */ ofs = ee_data[SROMC0InfoLeaf]; diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c index 6e64ff20a378..83f1727d1423 100644 --- a/drivers/net/ethernet/dec/tulip/dmfe.c +++ b/drivers/net/ethernet/dec/tulip/dmfe.c @@ -476,7 +476,7 @@ static int dmfe_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) } /* Set Node address */ - eth_hw_addr_set(dev, &db->srom[20 + i]); + eth_hw_addr_set(dev, &db->srom[20]); err = register_netdev (dev); if (err) -- cgit v1.2.3