diff options
author | Gautam Dawar <gautam.dawar@xilinx.com> | 2022-03-30 23:33:42 +0530 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-05-31 12:44:26 -0400 |
commit | ea239a67461a34839e2172ead3043295a9173389 (patch) | |
tree | 51b2302916d023e4ac5358bf075d54ecbec5bf2b /drivers/virtio/virtio_vdpa.c | |
parent | 175d493c3c3e09a3abaa843068fae0f0ad42c47e (diff) | |
download | linux-ea239a67461a34839e2172ead3043295a9173389.tar.bz2 |
virtio-vdpa: don't set callback if virtio doesn't need it
There's no need for setting callbacks for the driver that doesn't care
about that.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Gautam Dawar <gdawar@xilinx.com>
Message-Id: <20220330180436.24644-3-gdawar@xilinx.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_vdpa.c')
-rw-r--r-- | drivers/virtio/virtio_vdpa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 76504559bc25..46c71653f508 100644 --- a/drivers/virtio/virtio_vdpa.c +++ b/drivers/virtio/virtio_vdpa.c @@ -184,7 +184,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, } /* Setup virtqueue callback */ - cb.callback = virtio_vdpa_virtqueue_cb; + cb.callback = callback ? virtio_vdpa_virtqueue_cb : NULL; cb.private = info; ops->set_vq_cb(vdpa, index, &cb); ops->set_vq_num(vdpa, index, virtqueue_get_vring_size(vq)); |