aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2002-02-26 16:17:45 +0000
committerBruce Evans <bde@FreeBSD.org>2002-02-26 16:17:45 +0000
commitffe4d2f7c7cd89310b225d0efaef02a440dec30d (patch)
treedb0e07136feee9a3e867fa5832361aeceeddcc89
parentd52ccfe32102c2b7d45b53ea5cec2eb383a0f465 (diff)
Notes
-rw-r--r--sys/kern/subr_bus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index e190f2047b7a3..3f451d38b235d 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -359,10 +359,11 @@ devclass_alloc_unit(devclass_t dc, int *unitp)
/* If we were given a wired unit number, check for existing device */
/* XXX imp XXX */
if (unit != -1) {
- if (unit >= 0 && unit < dc->maxunit && dc->devices[unit]) {
+ if (unit >= 0 && unit < dc->maxunit &&
+ dc->devices[unit] != NULL) {
if (bootverbose)
- printf("%s: %s%d already exists, skipping it\n",
- dc->name, dc->name, *unitp);
+ printf("%s: %s%d already exists; skipping it\n",
+ dc->name, dc->name, *unitp);
return (EEXIST);
}
} else {