cifs: switch to new mount api
[sfrench/cifs-2.6.git] / fs / cifs / cifsencrypt.c
index 9daa256f69d419d16e6e178af28c5929023073b8..51d53e4bdf6b18cfc96f5be75ad1287db2bfe9a6 100644 (file)
@@ -661,6 +661,11 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
        unsigned char *tiblob = NULL; /* target info blob */
        __le64 rsp_timestamp;
 
+       if (nls_cp == NULL) {
+               cifs_dbg(VFS, "%s called with nls_cp==NULL\n", __func__);
+               return -EINVAL;
+       }
+
        if (ses->server->negflavor == CIFS_NEGFLAVOR_EXTENDED) {
                if (!ses->domainName) {
                        if (ses->domainAuto) {