diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-05-24 07:41:00 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-06-24 02:56:39 -0400 |
commit | 7d066459697610f6e755a7cfe199c3c6b142fb85 (patch) | |
tree | 7236d5c75ecefdacbed161ebb50c1b53407a1d43 /fs | |
parent | ffa598a5373d072a675f882999f5b46fb5ec2f69 (diff) |
cifs: make decode_ascii_ssetup void return
...rc is always set to 0.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/sess.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index f230571a7ab3..838e2240fc55 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -310,11 +310,10 @@ decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses, | |||
310 | return; | 310 | return; |
311 | } | 311 | } |
312 | 312 | ||
313 | static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | 313 | static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft, |
314 | struct cifs_ses *ses, | 314 | struct cifs_ses *ses, |
315 | const struct nls_table *nls_cp) | 315 | const struct nls_table *nls_cp) |
316 | { | 316 | { |
317 | int rc = 0; | ||
318 | int len; | 317 | int len; |
319 | char *bcc_ptr = *pbcc_area; | 318 | char *bcc_ptr = *pbcc_area; |
320 | 319 | ||
@@ -322,7 +321,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | |||
322 | 321 | ||
323 | len = strnlen(bcc_ptr, bleft); | 322 | len = strnlen(bcc_ptr, bleft); |
324 | if (len >= bleft) | 323 | if (len >= bleft) |
325 | return rc; | 324 | return; |
326 | 325 | ||
327 | kfree(ses->serverOS); | 326 | kfree(ses->serverOS); |
328 | 327 | ||
@@ -339,7 +338,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | |||
339 | 338 | ||
340 | len = strnlen(bcc_ptr, bleft); | 339 | len = strnlen(bcc_ptr, bleft); |
341 | if (len >= bleft) | 340 | if (len >= bleft) |
342 | return rc; | 341 | return; |
343 | 342 | ||
344 | kfree(ses->serverNOS); | 343 | kfree(ses->serverNOS); |
345 | 344 | ||
@@ -352,7 +351,7 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | |||
352 | 351 | ||
353 | len = strnlen(bcc_ptr, bleft); | 352 | len = strnlen(bcc_ptr, bleft); |
354 | if (len > bleft) | 353 | if (len > bleft) |
355 | return rc; | 354 | return; |
356 | 355 | ||
357 | /* No domain field in LANMAN case. Domain is | 356 | /* No domain field in LANMAN case. Domain is |
358 | returned by old servers in the SMB negprot response */ | 357 | returned by old servers in the SMB negprot response */ |
@@ -360,8 +359,6 @@ static int decode_ascii_ssetup(char **pbcc_area, __u16 bleft, | |||
360 | but thus do return domain here we could add parsing | 359 | but thus do return domain here we could add parsing |
361 | for it later, but it is not very important */ | 360 | for it later, but it is not very important */ |
362 | cifs_dbg(FYI, "ascii: bytes left %d\n", bleft); | 361 | cifs_dbg(FYI, "ascii: bytes left %d\n", bleft); |
363 | |||
364 | return rc; | ||
365 | } | 362 | } |
366 | 363 | ||
367 | int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, | 364 | int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, |
@@ -938,8 +935,7 @@ ssetup_ntlmssp_authenticate: | |||
938 | } | 935 | } |
939 | decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp); | 936 | decode_unicode_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp); |
940 | } else { | 937 | } else { |
941 | rc = decode_ascii_ssetup(&bcc_ptr, bytes_remaining, | 938 | decode_ascii_ssetup(&bcc_ptr, bytes_remaining, ses, nls_cp); |
942 | ses, nls_cp); | ||
943 | } | 939 | } |
944 | 940 | ||
945 | ssetup_exit: | 941 | ssetup_exit: |