Do not call devices probe/attach if there is nothing new was found.

This commit is contained in:
Alexander Motin 2009-02-23 08:58:29 +00:00
parent 43b4ee0925
commit 3b80d8accb

View File

@ -722,6 +722,10 @@ ata_identify(device_t dev)
/* Create new devices. */
if (bootverbose)
device_printf(dev, "New devices: %08x\n", n);
if (n == 0) {
mtx_unlock(&Giant);
return (0);
}
for (i = 0; i < ATA_PM; ++i) {
if (n & (((ATA_ATA_MASTER | ATA_ATAPI_MASTER) << i))) {
int unit = -1;