Commit 143337c9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

net: pasemi: Replace mac address parsing

Replace sscanf() with mac_pton().
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ce5c144f
...@@ -212,9 +212,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) ...@@ -212,9 +212,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac)
return -ENOENT; return -ENOENT;
} }
if (sscanf(maddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", if (!mac_pton(maddr, addr)) {
&addr[0], &addr[1], &addr[2], &addr[3], &addr[4], &addr[5])
!= ETH_ALEN) {
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"can't parse mac address, not configuring\n"); "can't parse mac address, not configuring\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment