Fix NULL-dereference kernel panic in case of mps_attach() failure.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2013-05-22 02:15:07 +00:00
parent d2e0ac3c78
commit ee6b37b56b

View File

@ -208,8 +208,8 @@ mps_detach_user(struct mps_softc *sc)
{
/* XXX: do a purge of pending requests? */
destroy_dev(sc->mps_cdev);
if (sc->mps_cdev != NULL)
destroy_dev(sc->mps_cdev);
}
static int