diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-03-22 17:50:11 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-05-10 19:15:25 -0500 |
commit | c1ea111fd1bb4c4020503f5c53cd05a703d1a30b (patch) | |
tree | a5d6c12613b0dd1d0d0a0aa290d89c7078ec36e8 /fs | |
parent | 269d3feec1b0f0c286ff3cc3eef43416614ee261 (diff) |
cifsd: Fix an error code in smb2_read()
This code is assigning the wrong variable to "err" so it returns
zero/success instead of -ENOMEM.
Fixes: 788b6f45c1d2 ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifsd/smb2pdu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c index 32816baa8a99..6770ebedc24a 100644 --- a/fs/cifsd/smb2pdu.c +++ b/fs/cifsd/smb2pdu.c @@ -6200,7 +6200,7 @@ int smb2_read(struct ksmbd_work *work) work->aux_payload_buf = ksmbd_alloc_response(length); } if (!work->aux_payload_buf) { - err = nbytes; + err = -ENOMEM; goto out; } |