OSDN Git Service

staging: ks7010: invert if statement conditionals
authorTobin C. Harding <me@tobin.cc>
Wed, 22 Mar 2017 02:06:27 +0000 (13:06 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2017 13:27:23 +0000 (14:27 +0100)
commit2c4951adfae24d901c699ebb918bb6e5c7865ab7
treeee0ab4b8fe0b9d27537f25e4b9fdcb4349a72f9e
parent6ad6e21bd4e4edd1a3f59dc74b5f238455c05e71
staging: ks7010: invert if statement conditionals

Checkpatch emits WARNING: Avoid multiple line dereference.

Function uses if statement blocks to guard the body of the
function. If we invert these conditionals and return, then the code
becomes more readable and subsequent code is indented less. The
checkpatch fix then follows trivially.

Invert conditionals, return from function if new conditional evaluates
to true. Reduce the level of indentation in subsequent code.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c