Commit bcbad25b authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

[PATCH] PCI Hotplug: checker patches

Fixes problems found by the CHECKER program in the pci hotplug drivers
parent a3a4fa0f
No related merge requests found
......@@ -1193,7 +1193,7 @@ int cpqhp_configure_board(struct controller *ctrl, struct pci_func * func)
if (temp != func->config_space[cloop >> 2]) {
dbg("Config space compare failure!!! offset = %x\n", cloop);
dbg("bus = %x, device = %x, function = %x\n", func->bus, func->device, func->function);
dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop]);
dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop >> 2]);
return 1;
}
}
......
......@@ -1621,23 +1621,23 @@ int ibmphp_unconfigure_card (struct slot **slot_cur, int the_end)
}
for (i = 0; i < count; i++) {
if (cur_func->io[count]) {
debug ("io[%d] exists \n", count);
if (cur_func->io[i]) {
debug ("io[%d] exists \n", i);
if (the_end > 0)
ibmphp_remove_resource (cur_func->io[count]);
cur_func->io[count] = NULL;
ibmphp_remove_resource (cur_func->io[i]);
cur_func->io[i] = NULL;
}
if (cur_func->mem[count]) {
debug ("mem[%d] exists \n", count);
if (cur_func->mem[i]) {
debug ("mem[%d] exists \n", i);
if (the_end > 0)
ibmphp_remove_resource (cur_func->mem[count]);
cur_func->mem[count] = NULL;
ibmphp_remove_resource (cur_func->mem[i]);
cur_func->mem[i] = NULL;
}
if (cur_func->pfmem[count]) {
debug ("pfmem[%d] exists \n", count);
if (cur_func->pfmem[i]) {
debug ("pfmem[%d] exists \n", i);
if (the_end > 0)
ibmphp_remove_resource (cur_func->pfmem[count]);
cur_func->pfmem[count] = NULL;
ibmphp_remove_resource (cur_func->pfmem[i]);
cur_func->pfmem[i] = NULL;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment