Fix NULL-dereference kernel panic in case of mps_attach() failure.
MFC after: 1 week
This commit is contained in:
parent
d2e0ac3c78
commit
ee6b37b56b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user