From: Ladi Prosek Date: Mon, 1 Feb 2016 18:36:31 +0000 (+0100) Subject: virtio-pci: read the right virtio_pci_notify_cap field X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4e94ebdd06d5dc72b7a40fc12fc496d601fb7bbc;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Michael S. Tsirkin --- 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), ¬ify_offset); /* We don't know how many VQs we'll map, ahead of the time.