Skip to content

Commit

Permalink
net: phy: at803x: Change error to EINVAL for invalid MAC
Browse files Browse the repository at this point in the history
Change the return error code to EINVAL if the MAC
address is not valid in the set_wol function.

Signed-off-by: Dan Murphy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Murphy authored and davem330 committed Oct 11, 2017
1 parent 87461f7 commit fc75568
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/at803x.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int at803x_set_wol(struct phy_device *phydev,
mac = (const u8 *) ndev->dev_addr;

if (!is_valid_ether_addr(mac))
return -EFAULT;
return -EINVAL;

for (i = 0; i < 3; i++) {
phy_write(phydev, AT803X_MMD_ACCESS_CONTROL,
Expand Down

0 comments on commit fc75568

Please sign in to comment.