diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-12-19 20:31:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-20 12:47:46 -0500 |
commit | 143337c9e1499429a554b5f69a64f4aad5d832aa (patch) | |
tree | 5ea7a3e3790ebe2854936acd88edd74afa187785 /drivers/net | |
parent | ce5c144f48d5e465bd9b9d676902cf4dcfcae4b9 (diff) | |
download | linux-143337c9e1499429a554b5f69a64f4aad5d832aa.tar.bz2 |
net: pasemi: Replace mac address parsing
Replace sscanf() with mac_pton().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/pasemi/pasemi_mac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index c9a55b774935..07a2eb3781b1 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c @@ -212,9 +212,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) return -ENOENT; } - if (sscanf(maddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", - &addr[0], &addr[1], &addr[2], &addr[3], &addr[4], &addr[5]) - != ETH_ALEN) { + if (!mac_pton(maddr, addr)) { dev_warn(&pdev->dev, "can't parse mac address, not configuring\n"); return -EINVAL; |