Only create the rdpti alias if the asr device creation succeeds.

This commit is contained in:
Scott Long 2005-04-29 04:47:11 +00:00
parent a8e6f0b6fa
commit a304e92b2b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145658

View File

@ -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 */