virtio_pci(4): Fix typo in read_ivar method

Prior to this revision, vtpci's BUS_READ_IVAR method on VIRTIO_IVAR_SUBVENDOR
accidentally returned the PCI subdevice.

The typo seems to have been introduced with the original commit adding
VIRTIO_IVAR_{{SUB,}DEVICE,{SUB,}VENDOR} to virtio_pci.  The commit log and code
strongly suggest that the ivar was intended to return the subvendor rather than
the subdevice; it was likely just a copy/paste mistake.

Go ahead and rectify that.
This commit is contained in:
cem 2019-05-25 01:59:24 +00:00
parent 13da854552
commit 5b32304d38

View File

@ -408,7 +408,7 @@ vtpci_read_ivar(device_t dev, device_t child, int index, uintptr_t *result)
*result = pci_get_device(dev);
break;
case VIRTIO_IVAR_SUBVENDOR:
*result = pci_get_subdevice(dev);
*result = pci_get_subvendor(dev);
break;
default:
return (ENOENT);