diff --git a/drivers/ethernet/eth_mcux.c b/drivers/ethernet/eth_mcux.c index 87249555f9c..084ed12e90a 100644 --- a/drivers/ethernet/eth_mcux.c +++ b/drivers/ethernet/eth_mcux.c @@ -1456,7 +1456,8 @@ static int ptp_clock_mcux_adjust(const struct device *dev, int increment) ARG_UNUSED(dev); - if ((increment <= -NSEC_PER_SEC) || (increment >= NSEC_PER_SEC)) { + if ((increment <= (int32_t)(-NSEC_PER_SEC)) || + (increment >= (int32_t)NSEC_PER_SEC)) { ret = -EINVAL; } else { key = irq_lock();