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
...@@ -1193,7 +1193,7 @@ int cpqhp_configure_board(struct controller *ctrl, struct pci_func * func) ...@@ -1193,7 +1193,7 @@ int cpqhp_configure_board(struct controller *ctrl, struct pci_func * func)
if (temp != func->config_space[cloop >> 2]) { if (temp != func->config_space[cloop >> 2]) {
dbg("Config space compare failure!!! offset = %x\n", cloop); dbg("Config space compare failure!!! offset = %x\n", cloop);
dbg("bus = %x, device = %x, function = %x\n", func->bus, func->device, func->function); 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; return 1;
} }
} }
......
...@@ -1621,23 +1621,23 @@ int ibmphp_unconfigure_card (struct slot **slot_cur, int the_end) ...@@ -1621,23 +1621,23 @@ int ibmphp_unconfigure_card (struct slot **slot_cur, int the_end)
} }
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
if (cur_func->io[count]) { if (cur_func->io[i]) {
debug ("io[%d] exists \n", count); debug ("io[%d] exists \n", i);
if (the_end > 0) if (the_end > 0)
ibmphp_remove_resource (cur_func->io[count]); ibmphp_remove_resource (cur_func->io[i]);
cur_func->io[count] = NULL; cur_func->io[i] = NULL;
} }
if (cur_func->mem[count]) { if (cur_func->mem[i]) {
debug ("mem[%d] exists \n", count); debug ("mem[%d] exists \n", i);
if (the_end > 0) if (the_end > 0)
ibmphp_remove_resource (cur_func->mem[count]); ibmphp_remove_resource (cur_func->mem[i]);
cur_func->mem[count] = NULL; cur_func->mem[i] = NULL;
} }
if (cur_func->pfmem[count]) { if (cur_func->pfmem[i]) {
debug ("pfmem[%d] exists \n", count); debug ("pfmem[%d] exists \n", i);
if (the_end > 0) if (the_end > 0)
ibmphp_remove_resource (cur_func->pfmem[count]); ibmphp_remove_resource (cur_func->pfmem[i]);
cur_func->pfmem[count] = NULL; 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