aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/ibmphp_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_pci.c')
-rw-r--r--drivers/pci/hotplug/ibmphp_pci.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/ibmphp_pci.c b/drivers/pci/hotplug/ibmphp_pci.c
index dc1876feb06f..25edd0b18b75 100644
--- a/drivers/pci/hotplug/ibmphp_pci.c
+++ b/drivers/pci/hotplug/ibmphp_pci.c
@@ -1267,20 +1267,19 @@ static int unconfigure_boot_device(u8 busno, u8 device, u8 function)
1267 size = size & 0xFFFFFFFC; 1267 size = size & 0xFFFFFFFC;
1268 size = ~size + 1; 1268 size = ~size + 1;
1269 end_address = start_address + size - 1; 1269 end_address = start_address + size - 1;
1270 if (ibmphp_find_resource(bus, start_address, &io, IO) < 0) { 1270 if (ibmphp_find_resource(bus, start_address, &io, IO))
1271 err("cannot find corresponding IO resource to remove\n"); 1271 goto report_search_failure;
1272 return -EIO; 1272
1273 }
1274 debug("io->start = %x\n", io->start); 1273 debug("io->start = %x\n", io->start);
1275 temp_end = io->end; 1274 temp_end = io->end;
1276 start_address = io->end + 1; 1275 start_address = io->end + 1;
1277 ibmphp_remove_resource(io); 1276 ibmphp_remove_resource(io);
1278 /* This is needed b/c of the old I/O restrictions in the BIOS */ 1277 /* This is needed b/c of the old I/O restrictions in the BIOS */
1279 while (temp_end < end_address) { 1278 while (temp_end < end_address) {
1280 if (ibmphp_find_resource(bus, start_address, &io, IO) < 0) { 1279 if (ibmphp_find_resource(bus, start_address,
1281 err("cannot find corresponding IO resource to remove\n"); 1280 &io, IO))
1282 return -EIO; 1281 goto report_search_failure;
1283 } 1282
1284 debug("io->start = %x\n", io->start); 1283 debug("io->start = %x\n", io->start);
1285 temp_end = io->end; 1284 temp_end = io->end;
1286 start_address = io->end + 1; 1285 start_address = io->end + 1;
@@ -1327,6 +1326,10 @@ static int unconfigure_boot_device(u8 busno, u8 device, u8 function)
1327 } /* end of for */ 1326 } /* end of for */
1328 1327
1329 return 0; 1328 return 0;
1329
1330report_search_failure:
1331 err("cannot find corresponding IO resource to remove\n");
1332 return -EIO;
1330} 1333}
1331 1334
1332static int unconfigure_boot_bridge(u8 busno, u8 device, u8 function) 1335static int unconfigure_boot_bridge(u8 busno, u8 device, u8 function)