Skip to content

Commit

Permalink
drivers: ethernet: fix adin set_config lock
Browse files Browse the repository at this point in the history
Use correct argument to lock/unlock the MAC.

Signed-off-by: Georgij Cernysiov <[email protected]>
  • Loading branch information
GeorgeCGV authored and MaureenHelm committed Nov 7, 2023
1 parent ec52722 commit 3be2956
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ethernet/eth_adin2111.c
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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;
}

Expand Down

0 comments on commit 3be2956

Please sign in to comment.