staging: ks7010: fix function return code path
Function has duplicate code clean up sequences; identical function call followed by return. This would be better expressed with the use of a goto statement, as is typical in-tree. One call site places the clean up code within the 'else' branch of an multi-way decision. This can be more clearly expressed by inverting the initial decision conditional and jumping directly to the cleanup code. Subsequent code indentation can then be reduced, aiding readability. Fix function return code execution path. Move clean up code to end of function with a label. Replace duplicate clean up code within function with a jump to label. Invert conditional, jump to label if new conditional evaluates to true, reduce indentation in subsequent code. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment