mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition
Streamline SendReceiveBlockingLock: Use "goto out:" in an error condition Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
17c8bfed8a
commit
698e96a826
1 changed files with 33 additions and 32 deletions
|
@ -1067,8 +1067,13 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,
|
|||
|
||||
/* rcvd frame is ok */
|
||||
|
||||
if (midQ->resp_buf && out_buf
|
||||
&& (midQ->midState == MID_RESPONSE_RECEIVED)) {
|
||||
if ((midQ->resp_buf == NULL) || (out_buf == NULL)
|
||||
|| (midQ->midState != MID_RESPONSE_RECEIVED)) {
|
||||
rc = -EIO;
|
||||
cERROR(1, ("Bad MID state?"));
|
||||
goto out;
|
||||
}
|
||||
|
||||
out_buf->smb_buf_length = receive_len;
|
||||
memcpy((char *)out_buf + 4,
|
||||
(char *)midQ->resp_buf + 4,
|
||||
|
@ -1098,10 +1103,6 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,
|
|||
/* do not count RFC1001 header */ +
|
||||
(2 * out_buf->WordCount) + 2 /* bcc */ )
|
||||
BCC(out_buf) = le16_to_cpu(BCC_LE(out_buf));
|
||||
} else {
|
||||
rc = -EIO;
|
||||
cERROR(1, ("Bad MID state?"));
|
||||
}
|
||||
|
||||
out:
|
||||
DeleteMidQEntry(midQ);
|
||||
|
|
Loading…
Reference in a new issue