summaryrefslogtreecommitdiff
path: root/drivers/virtio/virtio_pci_modern_dev.c
diff options
context:
space:
mode:
authorBo Liu <liubo03@inspur.com>2022-06-17 08:59:52 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-06-24 09:49:48 +0300
commit03d9571706942fa653a4975709820596d13563c7 (patch)
treef4c23638d28313c15944a337fe430484d42618f8 /drivers/virtio/virtio_pci_modern_dev.c
parenta7722890fdfb2aaeb6b02d68bb0f1e411e58d539 (diff)
downloadlinux-03d9571706942fa653a4975709820596d13563c7.tar.xz
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>
Diffstat (limited to 'drivers/virtio/virtio_pci_modern_dev.c')
-rw-r--r--drivers/virtio/virtio_pci_modern_dev.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci_modern_dev.c b/drivers/virtio/virtio_pci_modern_dev.c
index b790f30b2b56..fa2a9445bb18 100644
--- a/drivers/virtio/virtio_pci_modern_dev.c
+++ b/drivers/virtio/virtio_pci_modern_dev.c
@@ -220,8 +220,6 @@ int vp_modern_probe(struct virtio_pci_modern_device *mdev)
check_offsets();
- mdev->pci_dev = pci_dev;
-
/* We only own devices >= 0x1000 and <= 0x107f: leave the rest. */
if (pci_dev->device < 0x1000 || pci_dev->device > 0x107f)
return -ENODEV;