|
@@ -773,10 +773,11 @@ standard_receive3(struct TCP_Server_Info *server, struct mid_q_entry *mid)
|
|
|
cifs_dump_mem("Bad SMB: ", buf,
|
|
|
min_t(unsigned int, server->total_read, 48));
|
|
|
|
|
|
- if (mid)
|
|
|
- handle_mid(mid, server, smb_buffer, length);
|
|
|
+ if (!mid)
|
|
|
+ return length;
|
|
|
|
|
|
- return length;
|
|
|
+ handle_mid(mid, server, smb_buffer, length);
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
static int
|
|
@@ -2125,7 +2126,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
|
|
|
down_read(&key->sem);
|
|
|
upayload = key->payload.data;
|
|
|
if (IS_ERR_OR_NULL(upayload)) {
|
|
|
- rc = PTR_ERR(key);
|
|
|
+ rc = upayload ? PTR_ERR(upayload) : -EINVAL;
|
|
|
goto out_key_put;
|
|
|
}
|
|
|
|