* [PATCH] PCI: check pci_vpd_pci22_wait() return
@ 2011-04-17 15:22 Greg Thelen
2011-04-20 15:14 ` Jesse Barnes
0 siblings, 1 reply; 2+ messages in thread
From: Greg Thelen @ 2011-04-17 15:22 UTC (permalink / raw)
To: Jesse Barnes; +Cc: linux-pci, linux-kernel, Greg Thelen
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>
---
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 502610b..fdaa42a 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -334,6 +334,8 @@ static ssize_t pci_vpd_pci22_write(struct pci_dev *dev, loff_t pos, size_t count
vpd->busy = true;
vpd->flag = 0;
ret = pci_vpd_pci22_wait(dev);
+ if (ret < 0)
+ break;
pos += sizeof(u32);
}
--
1.7.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: check pci_vpd_pci22_wait() return
2011-04-17 15:22 [PATCH] PCI: check pci_vpd_pci22_wait() return Greg Thelen
@ 2011-04-20 15:14 ` Jesse Barnes
0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2011-04-20 15:14 UTC (permalink / raw)
To: Greg Thelen; +Cc: linux-pci, linux-kernel
On Sun, 17 Apr 2011 08:22:21 -0700
Greg Thelen <gthelen@google.com> wrote:
> 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.
Applied the two return value fixes to linux-next, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-20 15:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 15:22 [PATCH] PCI: check pci_vpd_pci22_wait() return Greg Thelen
2011-04-20 15:14 ` Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox