]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: split error handling code into multiple labels
authorCihangir Akturk <cakturk@gmail.com>
Sat, 9 Apr 2016 18:47:44 +0000 (21:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 04:03:27 +0000 (21:03 -0700)
commit59df51997181457ef27e2e5bf62d7f547ae79ac2
tree0de749924daae3daa2a60287cd6171f44895a140
parent594d1938a39990fe394a5d01028ea5ce2b3a0814
staging: lustre: split error handling code into multiple labels

Instead of using a switch-case statement to find out what kind of error
has just happened, split error handling logic into multiple labels and
jump right into the appropriate label to do the error handling. This way
it is easier to follow different code paths. It also looks easy on the
eyes.

Additionally silences the following coccinelle warning:

drivers/staging/lustre/lustre/obdecho/echo_client.c:762:22-27: ERROR: ed
is NULL but dereferenced.

Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdecho/echo_client.c