net: fm: Correct test for timeout
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 4 Aug 2025 16:03:57 +0000 (17:03 +0100)
committerPeng Fan <peng.fan@nxp.com>
Wed, 27 Aug 2025 07:39:57 +0000 (15:39 +0800)
commit44d321f0092a42b2295bd6eac41199604cf7d8c9
treec00edc87564dfbcbbe38954c846ba1a88eeecdb9
parent377159bfb8ee35ce16200818cfa55cdfba8c69e9
net: fm: Correct test for timeout

In bmi_rx_port_disable and bmi_tx_port_disable the use of post-decrement
on the test in the while loop for a timeout means that timeout will be
equal to -1 on exit in that case. Adjust the test for this expected
value.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/net/fm/eth.c