if (rc != 0)
                goto neg_exit;
 
-       if (rsp == NULL) {
-               rc = -EIO;
-               goto neg_exit;
-       }
-
        cFYI(1, "mode 0x%x", rsp->SecurityMode);
 
        if (rsp->DialectRevision == smb2protocols[SMB21_PROT].name)
 
        kfree(security_blob);
        rsp = (struct smb2_sess_setup_rsp *)iov[0].iov_base;
-       if (rsp->hdr.Status == STATUS_MORE_PROCESSING_REQUIRED) {
+       if (resp_buftype != CIFS_NO_BUFFER &&
+           rsp->hdr.Status == STATUS_MORE_PROCESSING_REQUIRED) {
                if (phase != NtLmNegotiate) {
                        cERROR(1, "Unexpected more processing error");
                        goto ssetup_exit;
                }
                if (offsetof(struct smb2_sess_setup_rsp, Buffer) - 4 !=
-                       le16_to_cpu(rsp->SecurityBufferOffset)) {
+                               le16_to_cpu(rsp->SecurityBufferOffset)) {
                        cERROR(1, "Invalid security buffer offset %d",
                                  le16_to_cpu(rsp->SecurityBufferOffset));
                        rc = -EIO;
        if (rc != 0)
                goto ssetup_exit;
 
-       if (rsp == NULL) {
-               rc = -EIO;
-               goto ssetup_exit;
-       }
-
        ses->session_flags = le16_to_cpu(rsp->SessionFlags);
 ssetup_exit:
        free_rsp_buf(resp_buftype, rsp);
                goto tcon_error_exit;
        }
 
-       if (rsp == NULL) {
-               rc = -EIO;
-               goto tcon_exit;
-       }
-
        if (tcon == NULL) {
                ses->ipc_tid = rsp->hdr.TreeId;
                goto tcon_exit;
                goto creat_exit;
        }
 
-       if (rsp == NULL) {
-               rc = -EIO;
-               goto creat_exit;
-       }
        *persistent_fid = rsp->PersistentFileId;
        *volatile_fid = rsp->VolatileFileId;
 
                goto close_exit;
        }
 
-       if (rsp == NULL) {
-               rc = -EIO;
-               goto close_exit;
-       }
-
        /* BB FIXME - decode close response, update inode for caching */
 
 close_exit:
                cifs_stats_fail_inc(tcon, SMB2_SET_INFO_HE);
                goto out;
        }
-
-       if (rsp == NULL) {
-               rc = -EIO;
-               goto out;
-       }
-
 out:
        free_rsp_buf(resp_buftype, rsp);
        kfree(iov);