mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user