Skip to content

Commit

Permalink
mac89x0: Fix build error.
Browse files Browse the repository at this point in the history
Need to use the new 'saddr' variable not the void 'addr' in
set_mac_address().

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 28, 2012
1 parent 0695512 commit 9100eb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/cirrus/mac89x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,13 @@ static void set_multicast_list(struct net_device *dev)

static int set_mac_address(struct net_device *dev, void *addr)
{
int i;
struct sockaddr *saddr = addr;
int i;

if (!is_valid_ether_addr(addr->sa_data))
if (!is_valid_ether_addr(saddr->sa_data))
return -EADDRNOTAVAIL;

memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
memcpy(dev->dev_addr, saddr->sa_data, ETH_ALEN);
printk("%s: Setting MAC address to %pM\n", dev->name, dev->dev_addr);

/* set the Ethernet address */
Expand Down

0 comments on commit 9100eb0

Please sign in to comment.