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

In memac_wait_until_free and memac_wait_until_done 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/memac_phy.c