PCI: check pci_vpd_pci22_wait() return

pci_vpd_pci22_write() calls pci_vpd_pci22_wait() after writing
PCI_VPD_DATA and PCI_VPD_ADDR to wait for the VPD operation to complete.
The result pci_vpd_pci22_wait() was not checked for error.

This change checks for error.

Signed-off-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
Greg Thelen 2011-04-17 08:22:21 -07:00 коммит произвёл Jesse Barnes
Родитель b6d95bb63c
Коммит d97ecd8191
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -324,6 +324,8 @@ static ssize_t pci_vpd_pci22_write(struct pci_dev *dev, loff_t pos, size_t count
vpd->busy = true; vpd->busy = true;
vpd->flag = 0; vpd->flag = 0;
ret = pci_vpd_pci22_wait(dev); ret = pci_vpd_pci22_wait(dev);
if (ret < 0)
break;
pos += sizeof(u32); pos += sizeof(u32);
} }