summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2009-02-23 08:58:29 +0000
committermav <mav@FreeBSD.org>2009-02-23 08:58:29 +0000
commitdcb65e8ff9b0f05a4441896449096f3a42b9cb73 (patch)
tree093666ee871bc1b7fefbfb40d827bcf9cc757a34 /sys/dev/ata
parentcd92a848979b25170096a42046ee3dc9e6e1553e (diff)
downloadFreeBSD-src-dcb65e8ff9b0f05a4441896449096f3a42b9cb73.zip
FreeBSD-src-dcb65e8ff9b0f05a4441896449096f3a42b9cb73.tar.gz
Do not call devices probe/attach if there is nothing new was found.
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 2033231..c30e820 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -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;
OpenPOWER on IntegriCloud