summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/ether.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r--drivers/usb/gadget/ether.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 1e187e5..8b24e00 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1978,8 +1978,8 @@ static int is_eth_addr_valid(char *str)
p = q;
}
- if (i == 6) /* it looks ok */
- return 1;
+ /* Now check the contents. */
+ return is_valid_ether_addr(ea);
}
return 0;
}