svn commit: r230340 - head/sys/dev/pci
John Baldwin
jhb at FreeBSD.org
Thu Jan 19 21:38:19 UTC 2012
Author: jhb
Date: Thu Jan 19 21:38:19 2012
New Revision: 230340
URL: http://svn.freebsd.org/changeset/base/230340
Log:
Properly return success once a matching VPD entry is found in
pci_get_vpd_readonly_method(). Previously the loop was always running
to completion and falling through to failing with ENXIO.
PR: kern/164313
Submitted by: Chuck Tuffli chuck tuffli net
MFC after: 1 week
Modified:
head/sys/dev/pci/pci.c
Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c Thu Jan 19 20:31:29 2012 (r230339)
+++ head/sys/dev/pci/pci.c Thu Jan 19 21:38:19 2012 (r230340)
@@ -1136,11 +1136,9 @@ pci_get_vpd_readonly_method(device_t dev
if (memcmp(kw, cfg->vpd.vpd_ros[i].keyword,
sizeof(cfg->vpd.vpd_ros[i].keyword)) == 0) {
*vptr = cfg->vpd.vpd_ros[i].value;
+ return (0);
}
- if (i != cfg->vpd.vpd_rocnt)
- return (0);
-
*vptr = NULL;
return (ENXIO);
}
More information about the svn-src-head
mailing list