提交 08591ccf 编写于 作者: N Namjae Jeon

cifsd: len can never be negative in ksmbd_init_sg()

Dan pointed out len can not be negative.
This patch remove unneeded negative check in loop.
Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: NSteve French <stfrench@microsoft.com>
上级 41a7848a
......@@ -1207,7 +1207,7 @@ static struct scatterlist *ksmbd_init_sg(struct kvec *iov, unsigned int nvec,
for (j = 0; j < nr_entries[i]; j++) {
unsigned int bytes = PAGE_SIZE - offset;
if (len <= 0)
if (!len)
break;
if (bytes > len)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册