Skip to content

Commit

Permalink
virtio-pci: read the right virtio_pci_notify_cap field
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ladi Prosek authored and Michael S. Tsirkin committed Mar 2, 2016
1 parent fc77dbd commit 4e94ebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/virtio/virtio_pci_modern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4e94ebd

Please sign in to comment.