Skip to content

Commit

Permalink
Staging: et131x: unify return value of .ndo_set_mac_address if addres…
Browse files Browse the repository at this point in the history
…s is invalid

Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Danny Kukawka authored and Greg Kroah-Hartman committed Feb 24, 2012
1 parent 72a474b commit d8aa3e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/et131x/et131x.c
Original file line number Diff line number Diff line change
Expand Up @@ -5177,7 +5177,7 @@ static int et131x_set_mac_addr(struct net_device *netdev, void *new_mac)

/* Make sure the requested MAC is valid */
if (!is_valid_ether_addr(address->sa_data))
return -EINVAL;
return -EADDRNOTAVAIL;

et131x_disable_txrx(netdev);
et131x_handle_send_interrupt(adapter);
Expand Down

0 comments on commit d8aa3e2

Please sign in to comment.