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")