1
0
Fork 0

[CIFS] Streamline SendReceive[2] by using "goto out:" in an error condition

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
wifi-calibration
Steve French 2008-12-11 17:26:54 +00:00
parent 8e4f2e8a1e
commit 2b2bdfba7a
1 changed files with 73 additions and 68 deletions

View File

@ -619,7 +619,11 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
cERROR(1, ("Frame too large received. Length: %d Xid: %d",
receive_len, xid));
rc = -EIO;
} else { /* rcvd frame is ok */
goto out;
}
/* rcvd frame is ok */
if (midQ->resp_buf &&
(midQ->midState == MID_RESPONSE_RECEIVED)) {
@ -662,7 +666,6 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
rc = -EIO;
cFYI(1, ("Bad MID state?"));
}
}
out:
DeleteMidQEntry(midQ);
@ -809,7 +812,10 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
cERROR(1, ("Frame too large received. Length: %d Xid: %d",
receive_len, xid));
rc = -EIO;
} else { /* rcvd frame is ok */
goto out;
}
/* rcvd frame is ok */
if (midQ->resp_buf && out_buf
&& (midQ->midState == MID_RESPONSE_RECEIVED)) {
@ -846,7 +852,6 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
rc = -EIO;
cERROR(1, ("Bad MID state?"));
}
}
out:
DeleteMidQEntry(midQ);