From 3be2956b866e3edfed4ad7617e8ca01e16d98065 Mon Sep 17 00:00:00 2001 From: Georgij Cernysiov Date: Mon, 6 Nov 2023 12:26:12 +0100 Subject: [PATCH] drivers: ethernet: fix adin set_config lock Use correct argument to lock/unlock the MAC. Signed-off-by: Georgij Cernysiov --- drivers/ethernet/eth_adin2111.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ethernet/eth_adin2111.c b/drivers/ethernet/eth_adin2111.c index 070b8698c10a..e73beb891d4b 100644 --- a/drivers/ethernet/eth_adin2111.c +++ b/drivers/ethernet/eth_adin2111.c @@ -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; }