futex: Return error code instead of assigning it without effect
[sfrench/cifs-2.6.git] / kernel / futex.c
index e7b4c6121da4e95af5df3dcaa9ef27cf5c934f28..30e7daebaec8447fed43cc202087ee1d88052ddd 100644 (file)
@@ -2025,7 +2025,7 @@ futex_proxy_trylock_atomic(u32 __user *pifutex, struct futex_hash_bucket *hb1,
         * and waiting on the 'waitqueue' futex which is always !PI.
         */
        if (!top_waiter->rt_waiter || top_waiter->pi_state)
-               ret = -EINVAL;
+               return -EINVAL;
 
        /* Ensure we requeue to the expected futex. */
        if (!match_futex(top_waiter->requeue_pi_key, key2))