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

cifsd: fix static checker warning from smb_direct_post_send_data()

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

Reference: https://git.kernel.org/torvalds/linux/c/bc3fcc9462ef

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

Dan reported static checker warning:
 fs/cifsd/transport_rdma.c:1168 smb_direct_post_send_data()
 warn: missing error code 'ret'

This patch add missing ret error code.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
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>
上级 e2d0a497
......@@ -1165,6 +1165,7 @@ static int smb_direct_post_send_data(struct smb_direct_transport *t,
sg, SMB_DIRECT_MAX_SEND_SGES-1, DMA_TO_DEVICE);
if (sg_cnt <= 0) {
ksmbd_err("failed to map buffer\n");
ret = -ENOMEM;
goto err;
} else if (sg_cnt + msg->num_sge > SMB_DIRECT_MAX_SEND_SGES-1) {
ksmbd_err("buffer not fitted into sges\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册