Skip to content

Commit 03d9571

Browse files
Bo Liumstsirkin
authored andcommitted
virtio: Remove unnecessary variable assignments
In function vp_modern_probe(), "pci_dev" is initialized with the value of "mdev->pci_dev", so assigning "pci_dev" to "mdev->pci_dev" is unnecessary since they store the same value. Signed-off-by: Bo Liu <liubo03@inspur.com> Message-Id: <20220617055952.5364-1-liubo03@inspur.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
1 parent a772289 commit 03d9571

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

drivers/virtio/virtio_pci_modern_dev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev)
220220

221221
check_offsets();
222222

223-
mdev->pci_dev = pci_dev;
224-
225223
/* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
226224
if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
227225
return -ENODEV;

0 commit comments

Comments
 (0)