fs: semihosting: Use correct variable for error check mainline origin/mainline
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 2 Oct 2025 09:39:58 +0000 (10:39 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 18 Oct 2025 00:07:20 +0000 (18:07 -0600)
commita58089ad2e41e88f81360f0e99bfd0715aceb556
treecc68ba2b267cc7662319915e133db0acf01bd775
parent64a4645c4e4f54d4e67d2954ed20b9e1af389530
fs: semihosting: Use correct variable for error check

After calling a function that can return an error, the test to detect
that error should use the return value not a different variable. Fix it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Fixes: f676b45151c3 ("fs: Add semihosting filesystem")
fs/semihostingfs.c