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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
41a7848a01
commit
08591ccfdd
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user