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 <gardner.ben@gmail.com>
Found-by: Coverity (75577)
Reviewed-on: https://review.coreboot.org/14195
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
1 file changed