From fa69f472aa89899d2beb59b933480aed0e944f5e Mon Sep 17 00:00:00 2001 From: Declan Snyder Date: Thu, 30 Nov 2023 17:18:59 -0600 Subject: [PATCH] drivers: mdio_nxp_enet: fix ampersands typo Fix code typo with &&->& and redundant operation Signed-off-by: Declan Snyder --- drivers/mdio/mdio_nxp_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mdio/mdio_nxp_enet.c b/drivers/mdio/mdio_nxp_enet.c index c1a3df3169..2ea43e4842 100644 --- a/drivers/mdio/mdio_nxp_enet.c +++ b/drivers/mdio/mdio_nxp_enet.c @@ -62,7 +62,7 @@ static int nxp_enet_mdio_wait_xfer(const struct device *dev) * ethernet driver has not initiaized, just do a busy wait */ k_busy_wait(USEC_PER_MSEC * config->timeout); - if (base->EIR && ENET_EIR_MII_MASK == ENET_EIR_MII_MASK) { + if (base->EIR & ENET_EIR_MII_MASK) { ret = 0; } else { ret = -ETIMEDOUT; @@ -70,7 +70,7 @@ static int nxp_enet_mdio_wait_xfer(const struct device *dev) } else if (k_sem_take(&data->mdio_sem, K_MSEC(config->timeout))) { /* Interrupt was enabled but did not occur in time */ ret = -ETIMEDOUT; - } else if (base->EIR && ENET_EIR_MII_MASK == ENET_EIR_MII_MASK) { + } else if (base->EIR & ENET_EIR_MII_MASK) { /* Interrupt happened meaning mdio transaction completed */ ret = 0; } else {