]> 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)
commita6749135d284278ef328ebb74d63358d932a5e75
tree05537631ee020ece7cee0c47e20d29bc12a50a7e
parent8d4677b82042ff6415b21b1028d2befddda64512
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