virtio/vsock: check argument to avoid no effect call
authorArseniy Krasnov <avkrasnov@sberdevices.ru>
Sat, 25 Mar 2023 22:04:50 +0000 (01:04 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Mar 2023 10:03:50 +0000 (12:03 +0200)
commite3ec366eb0d1d5f7cbe28e747c76180f7d45f00d
treeb1f15a04c52372e0f22431bf61ff69b1635112bf
parentb68ffb1b3bee3762f7579bdcc9ca3d415ed0b9b4
virtio/vsock: check argument to avoid no effect call

Both of these functions have no effect when input argument is 0, so to
avoid useless spinlock access, check argument before it.

Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/vmw_vsock/virtio_transport_common.c