提交 8ef32967 编写于 作者: D Dan Carpenter 提交者: Steve French

cifsd: fix a IS_ERR() vs NULL bug

The smb_direct_alloc_sendmsg() function never returns NULL, it only
returns error pointers so the check needs to be updated.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 86df49e1
......@@ -997,8 +997,8 @@ static int smb_direct_create_header(struct smb_direct_transport *t,
int ret;
sendmsg = smb_direct_alloc_sendmsg(t);
if (!sendmsg)
return -ENOMEM;
if (IS_ERR(sendmsg))
return PTR_ERR(sendmsg);
/* Fill in the packet header */
packet = (struct smb_direct_data_transfer *)sendmsg->packet;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册