]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
virtio: Remove unnecessary variable assignments
authorBo Liu <liubo03@inspur.com>
Fri, 17 Jun 2022 05:59:52 +0000 (01:59 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 24 Jun 2022 06:49:48 +0000 (02:49 -0400)
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>
drivers/virtio/virtio_pci_modern_dev.c

index b790f30b2b56620e1def1effc366abee5dad4bf9..fa2a9445bb18c8b3799f8da51e520c45f34643a3 100644 (file)
@@ -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;