]> git.baikalelectronics.ru Git - kernel.git/commit
futex: Remove needless goto's
authorAndré Almeida <andrealmeid@collabora.com>
Thu, 2 Jul 2020 20:28:41 +0000 (17:28 -0300)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 17 Jul 2020 21:58:49 +0000 (23:58 +0200)
commit2650959df164be6e875993120abe9b9ff911e564
treec884c39eff417e33617dee9c0a1b03fb0e7aef00
parent410028bd801b13079b337de7eb8cbdde56bb0247
futex: Remove needless goto's

As stated in the coding style documentation, "if there is no cleanup
needed then just return directly", instead of jumping to a label and
then returning.

Remove such goto's and replace with a return statement.  When there's a
ternary operator on the return value, replace it with the result of the
operation when it is logically possible to determine it by the control
flow.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200702202843.520764-3-andrealmeid@collabora.com
kernel/futex.c