Memtest86+: fix lock without unlock in error()

Coverity spotted a case where spin_lock() was called with the possibility
of leaving the function without calling spin_unlock().

Since the code between the lock and return only operates on local vars,
the lock can be moved down to where it is actually needed.

Change-Id: Ifc077e8529db026f66788ccb20152dbe5ad8ea74
Signed-off-by: Ben Gardner <>
Found-by: Coverity (75577)
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <>
1 file changed