Index: cpukit/posix/src/pspinlocktranslatereturncode.c
===================================================================
--- cpukit/posix/src/pspinlocktranslatereturncode.c	(revision 631b3c8967a329cdd53e54365e4e4c0aa93a4251)
+++ cpukit/posix/src/pspinlocktranslatereturncode.c	(revision 9ec7d492b951efec32520bff7106e21e16e9c74d)
@@ -32,6 +32,5 @@
   -1,                       /* CORE_SPINLOCK_TIMEOUT */
   EBUSY,                    /* CORE_SPINLOCK_IS_BUSY */
-  EBUSY,                    /* CORE_SPINLOCK_UNAVAILABLE */
-  0                         /* CORE_SPINLOCK_NOT_LOCKED */
+  EBUSY                     /* CORE_SPINLOCK_UNAVAILABLE */
 };
 
Index: cpukit/score/include/rtems/score/corespinlockimpl.h
===================================================================
--- cpukit/score/include/rtems/score/corespinlockimpl.h	(revision 631b3c8967a329cdd53e54365e4e4c0aa93a4251)
+++ cpukit/score/include/rtems/score/corespinlockimpl.h	(revision 9ec7d492b951efec32520bff7106e21e16e9c74d)
@@ -59,13 +59,9 @@
    *  unavailable.
    */
-  CORE_SPINLOCK_UNAVAILABLE,
-  /** This status indicates that the spinlock is not currently locked and thus
-   *  should not be released.
-   */
-  CORE_SPINLOCK_NOT_LOCKED
+  CORE_SPINLOCK_UNAVAILABLE
 }   CORE_spinlock_Status;
 
 /** This is a shorthand for the last status code. */
-#define CORE_SPINLOCK_STATUS_LAST CORE_SPINLOCK_NOT_LOCKED
+#define CORE_SPINLOCK_STATUS_LAST CORE_SPINLOCK_UNAVAILABLE
 
 /** This indicates the lock is available. */
Index: cpukit/score/src/corespinlockrelease.c
===================================================================
--- cpukit/score/src/corespinlockrelease.c	(revision 631b3c8967a329cdd53e54365e4e4c0aa93a4251)
+++ cpukit/score/src/corespinlockrelease.c	(revision 9ec7d492b951efec32520bff7106e21e16e9c74d)
@@ -30,15 +30,10 @@
 
     /*
-     *  It must locked before it can be unlocked.
-     */
-    if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
-      _CORE_spinlock_Release( the_spinlock, lock_context );
-      return CORE_SPINLOCK_NOT_LOCKED;
-    }
-
-    /*
      *  It must locked by the current thread before it can be unlocked.
      */
-    if ( the_spinlock->holder != _Thread_Executing ) {
+    if (
+      the_spinlock->lock != CORE_SPINLOCK_LOCKED
+        || the_spinlock->holder != _Thread_Executing
+    ) {
       _CORE_spinlock_Release( the_spinlock, lock_context );
       return CORE_SPINLOCK_NOT_HOLDER;
Index: testsuites/psxtests/psxspin01/psxspin01.scn
===================================================================
--- testsuites/psxtests/psxspin01/psxspin01.scn	(revision 631b3c8967a329cdd53e54365e4e4c0aa93a4251)
+++ testsuites/psxtests/psxspin01/psxspin01.scn	(revision 9ec7d492b951efec32520bff7106e21e16e9c74d)
@@ -1,3 +1,3 @@
-*** POSIX SPINLOCK TEST 01 ***
+*** BEGIN OF TEST PSXSPIN 1 ***
 pthread_spin_init( NULL, PTHREAD_PROCESS_PRIVATE ) -- EINVAL
 pthread_spin_init( NULL, PTHREAD_PROCESS_SHARED ) -- EINVAL
@@ -15,5 +15,5 @@
 pthread_spin_unlock( &spinlock ) -- EINVAL
 pthread_spin_destroy( &spinlock ) -- EINVAL
-pthread_spin_unlock( &Spinlock ) -- already unlocked OK
+pthread_spin_unlock( &Spinlock ) -- EPERM
 pthread_spin_lock( &Spinlock ) -- OK
 pthread_spin_lock( &Spinlock ) -- EDEADLK
@@ -24,4 +24,5 @@
 pthread_spin_lock( &Spinlock ) from Thread -- OK
 sleep to allow main thread to run
+pthread_spin_unlock( &Spinlock ) -- EPERM
 pthread_spin_lock( &Spinlock ) -- OK
 pthread_spin_unlock( &Spinlock ) from Thread -- OK
@@ -29,3 +30,3 @@
 pthread_spin_unlock( &Spinlock ) -- OK
 pthread_spin_destroy( &Spinlock ) -- OK
-*** END OF POSIX SPINLOCK TEST 01 ***
+*** END OF TEST PSXSPIN 1 ***
Index: testsuites/psxtests/psxspin01/test.c
===================================================================
--- testsuites/psxtests/psxspin01/test.c	(revision 631b3c8967a329cdd53e54365e4e4c0aa93a4251)
+++ testsuites/psxtests/psxspin01/test.c	(revision 9ec7d492b951efec32520bff7106e21e16e9c74d)
@@ -147,7 +147,7 @@
   rtems_test_assert( status == EINVAL );
 
-  puts( "pthread_spin_unlock( &Spinlock ) -- already unlocked OK" );
-  status = pthread_spin_unlock( &Spinlock );
-  rtems_test_assert( status == 0 );
+  puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
+  status = pthread_spin_unlock( &Spinlock );
+  rtems_test_assert( status == EPERM );
 
   /* Now some basic locking and unlocking with a deadlock verification */
@@ -201,4 +201,9 @@
 
   mainThreadSpinning = 1;
+
+  puts( "pthread_spin_unlock( &Spinlock ) -- EPERM" );
+  status = pthread_spin_unlock( &Spinlock );
+  rtems_test_assert( status == EPERM );
+
   puts( "pthread_spin_lock( &Spinlock ) -- OK" );
   status = pthread_spin_lock( &Spinlock );
