diff options
author | Greg Thelen <gthelen@google.com> | 2011-04-17 11:22:21 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-05-10 18:43:35 -0400 |
commit | d97ecd819137118b4686a753415f93215a6edacf (patch) | |
tree | 68148c65b62796b9d99b1b48ddcd64c4aec6b19c /drivers/pci/access.c | |
parent | b6d95bb63ce6cea7c1a344aa46bbd6e253a3f6ce (diff) |
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>
Diffstat (limited to 'drivers/pci/access.c')
-rw-r--r-- | drivers/pci/access.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 531bc697d800..0c1f20f570a4 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c | |||
@@ -324,6 +324,8 @@ static ssize_t pci_vpd_pci22_write(struct pci_dev *dev, loff_t pos, size_t count | |||
324 | vpd->busy = true; | 324 | vpd->busy = true; |
325 | vpd->flag = 0; | 325 | vpd->flag = 0; |
326 | ret = pci_vpd_pci22_wait(dev); | 326 | ret = pci_vpd_pci22_wait(dev); |
327 | if (ret < 0) | ||
328 | break; | ||
327 | 329 | ||
328 | pos += sizeof(u32); | 330 | pos += sizeof(u32); |
329 | } | 331 | } |