diff options
author | Steve French <smfrench@gmail.com> | 2015-05-20 10:32:21 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2015-05-20 10:32:21 -0400 |
commit | 1dc92c450a53f120b67296cb4b29c1dfdc665ac1 (patch) | |
tree | 5a63e2bc7f66019ead5595d8d217b8332582ca2c /fs/cifs | |
parent | bc8ebdc4f54cc944b0ecc0fb0d18b0ffbaab0468 (diff) |
[cifs] fix null pointer check
Dan Carpenter pointed out an inconsistent null pointer check
in smb2_hdr_assemble that was pointed out by static checker.
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Sachin Prabhu <sprabhu@redhat.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>w
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/smb2pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 65cd7a84c8bc..54cbe19d9c08 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -110,7 +110,7 @@ smb2_hdr_assemble(struct smb2_hdr *hdr, __le16 smb2_cmd /* command */ , | |||
110 | 110 | ||
111 | /* GLOBAL_CAP_LARGE_MTU will only be set if dialect > SMB2.02 */ | 111 | /* GLOBAL_CAP_LARGE_MTU will only be set if dialect > SMB2.02 */ |
112 | /* See sections 2.2.4 and 3.2.4.1.5 of MS-SMB2 */ | 112 | /* See sections 2.2.4 and 3.2.4.1.5 of MS-SMB2 */ |
113 | if ((tcon->ses) && | 113 | if ((tcon->ses) && (tcon->ses->server) && |
114 | (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU)) | 114 | (tcon->ses->server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU)) |
115 | hdr->CreditCharge = cpu_to_le16(1); | 115 | hdr->CreditCharge = cpu_to_le16(1); |
116 | /* else CreditCharge MBZ */ | 116 | /* else CreditCharge MBZ */ |