aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {