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-Tag: v4.9.8~2465^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e94ebdd06d5dc72b7a40fc12fc496d601fb7bbc;p=platform%2Fkernel%2Flinux-rpi3.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 c0c11fa..7760fc1 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.