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
This commit is contained in:
parent
d99ecc7db3
commit
df4ce32fcb
@ -1136,11 +1136,9 @@ pci_get_vpd_readonly_method(device_t dev, device_t child, const char *kw,
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user