mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 20:26:43 +07:00
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>
This commit is contained in:
parent
ce5c144f48
commit
143337c9e1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user