OSDN Git Service

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)
commiteb8c4e546961cbdb7d448458c24dfae9d1622510
tree05537631ee020ece7cee0c47e20d29bc12a50a7e
parent1e0aa795daf9b7adeb4fccb7394c12e39f31c020
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