]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: remove multi-way decision
authorTobin C. Harding <me@tobin.cc>
Mon, 10 Apr 2017 03:16:00 +0000 (13:16 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Apr 2017 14:14:33 +0000 (16:14 +0200)
commit4bb7cfff00276d27cf2b96753226c30e6e882ab8
tree05537631ee020ece7cee0c47e20d29bc12a50a7e
parenta6bc49811ca9ee3c12d1172295349273da102091
staging: ks7010: remove multi-way decision

Function uses multi-way decision for control flow. Final statement of
function is spin_unlock(). Code can be simplified by adding a goto label
labelling the call to spin_unlock() and jumping to label instead of
using multi-way decision. This allows the code to be indented one
level less which adds to the readability.

Add goto label. Remove multi-way decision by jumping to label. Reduce
indentation in subsequent code. Do not change program logic.

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