aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index d21e51a02c3e..592d424412ea 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1473,22 +1473,26 @@ ide_hwif_t *ide_find_port_slot(const struct ide_port_info *d)
1473 for (; i < MAX_HWIFS; i++) { 1473 for (; i < MAX_HWIFS; i++) {
1474 hwif = &ide_hwifs[i]; 1474 hwif = &ide_hwifs[i];
1475 if (hwif->chipset == ide_unknown) 1475 if (hwif->chipset == ide_unknown)
1476 return hwif; 1476 goto out_found;
1477 } 1477 }
1478 } else { 1478 } else {
1479 for (i = 2; i < MAX_HWIFS; i++) { 1479 for (i = 2; i < MAX_HWIFS; i++) {
1480 hwif = &ide_hwifs[i]; 1480 hwif = &ide_hwifs[i];
1481 if (hwif->chipset == ide_unknown) 1481 if (hwif->chipset == ide_unknown)
1482 return hwif; 1482 goto out_found;
1483 } 1483 }
1484 for (i = 0; i < 2 && i < MAX_HWIFS; i++) { 1484 for (i = 0; i < 2 && i < MAX_HWIFS; i++) {
1485 hwif = &ide_hwifs[i]; 1485 hwif = &ide_hwifs[i];
1486 if (hwif->chipset == ide_unknown) 1486 if (hwif->chipset == ide_unknown)
1487 return hwif; 1487 goto out_found;
1488 } 1488 }
1489 } 1489 }
1490 1490
1491 return NULL; 1491 return NULL;
1492
1493out_found:
1494 ide_init_port_data(hwif, i);
1495 return hwif;
1492} 1496}
1493EXPORT_SYMBOL_GPL(ide_find_port_slot); 1497EXPORT_SYMBOL_GPL(ide_find_port_slot);
1494 1498