summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2016-02-01 21:36:31 +0300
committerMichael S. Tsirkin <mst@redhat.com>2016-03-02 18:01:49 +0300
commit4e94ebdd06d5dc72b7a40fc12fc496d601fb7bbc (patch)
tree113da9721a062241f4108c993d29bdb67740cd36 /drivers/virtio
parentfc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff)
downloadlinux-4e94ebdd06d5dc72b7a40fc12fc496d601fb7bbc.tar.xz
virtio-pci: read the right virtio_pci_notify_cap field
Looks like a copy-paste bug. The value is used as an optimization and a wrong value probably isn't causing any serious damage. Found when porting this code to Windows. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_pci_modern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index c0c11fad4611..7760fc1a2218 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -679,7 +679,7 @@ int virtio_pci_modern_probe(struct virtio_pci_device *vp_dev)
pci_read_config_dword(pci_dev,
notify + offsetof(struct virtio_pci_notify_cap,
- cap.length),
+ cap.offset),
&notify_offset);
/* We don't know how many VQs we'll map, ahead of the time.