Commit 08591ccf authored by Namjae Jeon's avatar 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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment