]> git.baikalelectronics.ru Git - kernel.git/commit
vsock/virtio: remove redundant `copy_failed` variable
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 18 Jun 2021 13:35:26 +0000 (15:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jun 2021 19:59:53 +0000 (12:59 -0700)
commit7ac1ba4989f137785e3c4a697bedd81c1807b5a1
tree6cb49e7b655cc363f24a5d479349c6d2a6dba712
parent826de8dd6813bc2504bb98d0ea7603e4018bf231
vsock/virtio: remove redundant `copy_failed` variable

When memcpy_to_msg() fails in virtio_transport_seqpacket_do_dequeue(),
we already set `dequeued_len` with the negative error value returned
by memcpy_to_msg().

So we can directly check `dequeued_len` value instead of using a
dedicated flag variable to skip the copy path for the rest of
fragments.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/virtio_transport_common.c