2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00

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>
This commit is contained in:
Ladi Prosek 2016-02-01 19:36:31 +01:00 committed by Michael S. Tsirkin
parent fc77dbd34c
commit 4e94ebdd06

View File

@ -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.