mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue