From a304e92b2b094eb74e1fc394fd1b5fe8fa78f8be Mon Sep 17 00:00:00 2001 From: Scott Long Date: Fri, 29 Apr 2005 04:47:11 +0000 Subject: [PATCH] Only create the rdpti alias if the asr device creation succeeds. --- sys/dev/asr/asr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index a6dff07b6d41..56a9462e3e18 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -2582,7 +2582,8 @@ asr_attach(device_t tag) */ sc->ha_devt = make_dev(&asr_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0640, "asr%d", unit); - (void)make_dev_alias(sc->ha_devt, "rdpti%d", unit); + if (sc->ha_devt != NULL) + (void)make_dev_alias(sc->ha_devt, "rdpti%d", unit); sc->ha_devt->si_drv1 = sc; return(0); } /* asr_attach */