diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index a58dc77cc443..c1c2006376a1 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -375,16 +375,15 @@ CIFSSMBNegotiate(const unsigned int xid, struct cifs_ses *ses) | |||
375 | int rc = 0; | 375 | int rc = 0; |
376 | int bytes_returned; | 376 | int bytes_returned; |
377 | int i; | 377 | int i; |
378 | struct TCP_Server_Info *server; | 378 | struct TCP_Server_Info *server = ses->server; |
379 | u16 count; | 379 | u16 count; |
380 | unsigned int secFlags; | 380 | unsigned int secFlags; |
381 | 381 | ||
382 | if (ses->server) | 382 | if (!server) { |
383 | server = ses->server; | 383 | WARN(1, "%s: server is NULL!\n", __func__); |
384 | else { | 384 | return -EIO; |
385 | rc = -EIO; | ||
386 | return rc; | ||
387 | } | 385 | } |
386 | |||
388 | rc = smb_init(SMB_COM_NEGOTIATE, 0, NULL /* no tcon yet */ , | 387 | rc = smb_init(SMB_COM_NEGOTIATE, 0, NULL /* no tcon yet */ , |
389 | (void **) &pSMB, (void **) &pSMBr); | 388 | (void **) &pSMB, (void **) &pSMBr); |
390 | if (rc) | 389 | if (rc) |