提交 4f858d0d 编写于 作者: N Namjae Jeon 提交者: Zhong Jinghua

cifsd: fix WARNING: Possible unnecessary 'out of memory' message

mainline inclusion
from mainline-5.15-rc1
commit 63c454f8
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G
CVE: NA

Reference: https://git.kernel.org/torvalds/linux/c/63c454f83928

-------------------------------

WARNING: Possible unnecessary 'out of memory' message
902: FILE: fs/cifsd/smb2pdu.c:569:
+       if (!work->response_buf) {
+               ksmbd_err("Failed to allocate %zu bytes buffer\n", sz);

Fix a warning from checkpatch.pl.
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
Signed-off-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: NZhong Jinghua <zhongjinghua@huawei.com>
上级 5ac15ad9
...@@ -565,10 +565,8 @@ int smb2_allocate_rsp_buf(struct ksmbd_work *work) ...@@ -565,10 +565,8 @@ int smb2_allocate_rsp_buf(struct ksmbd_work *work)
else else
work->response_buf = kvmalloc(sz, GFP_KERNEL | __GFP_ZERO); work->response_buf = kvmalloc(sz, GFP_KERNEL | __GFP_ZERO);
if (!work->response_buf) { if (!work->response_buf)
ksmbd_err("Failed to allocate %zu bytes buffer\n", sz);
return -ENOMEM; return -ENOMEM;
}
work->response_sz = sz; work->response_sz = sz;
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册