Merge tag 'tegra-for-4.8-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / drivers / vfio / pci / vfio_pci_config.c
index 9360140..688691d 100644 (file)
@@ -749,7 +749,8 @@ static int vfio_vpd_config_write(struct vfio_pci_device *vdev, int pos,
                if (pci_write_vpd(pdev, addr & ~PCI_VPD_ADDR_F, 4, &data) != 4)
                        return count;
        } else {
-               if (pci_read_vpd(pdev, addr, 4, &data) != 4)
+               data = 0;
+               if (pci_read_vpd(pdev, addr, 4, &data) < 0)
                        return count;
                *pdata = cpu_to_le32(data);
        }