drivers: ethernet: fix adin set_config lock

Use correct argument to lock/unlock the MAC.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
This commit is contained in:
Georgij Cernysiov 2023-11-06 12:26:12 +01:00 committed by Maureen Helm
parent ec52722861
commit 3be2956b86

View file

@ -700,7 +700,7 @@ static int adin2111_port_set_config(const struct device *dev,
const struct device *adin = cfg->adin;
int ret = -ENOTSUP;
(void)eth_adin2111_lock(dev, K_FOREVER);
(void)eth_adin2111_lock(adin, K_FOREVER);
if (type == ETHERNET_CONFIG_TYPE_MAC_ADDRESS) {
ret = adin2111_filter_unicast(adin, (uint8_t *)&config->mac_address.addr[0],
@ -716,7 +716,7 @@ static int adin2111_port_set_config(const struct device *dev,
}
end_unlock:
(void)eth_adin2111_unlock(dev);
(void)eth_adin2111_unlock(adin);
return ret;
}