From: Volker Lendecke Date: Sat, 6 Dec 2008 12:12:34 +0000 (+0100) Subject: Simplify allocate_mid() slightly: Remove some unnecessary "else" branches X-Git-Tag: v2.6.29-rc1~582^2~10 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8fbbd365cc700e288fb6f9780b092c5afa4946e5;p=~shefty%2Frdma-dev.git Simplify allocate_mid() slightly: Remove some unnecessary "else" branches Simplify allocate_mid() slightly: Remove some unnecessary "else" branches Signed-off-by: Volker Lendecke Acked-by: Jeff Layton Signed-off-by: Steve French --- diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index e80210693ff..c98f929315f 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -385,10 +385,14 @@ static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf, { if (ses->server->tcpStatus == CifsExiting) { return -ENOENT; - } else if (ses->server->tcpStatus == CifsNeedReconnect) { + } + + if (ses->server->tcpStatus == CifsNeedReconnect) { cFYI(1, ("tcp session dead - return to caller to retry")); return -EAGAIN; - } else if (ses->status != CifsGood) { + } + + if (ses->status != CifsGood) { /* check if SMB session is bad because we are setting it up */ if ((in_buf->Command != SMB_COM_SESSION_SETUP_ANDX) && (in_buf->Command != SMB_COM_NEGOTIATE))