mgb: Do not KASSERT on error in mgb_init

There's not much we can do if mii_mediachg() fails, but KASSERT is not
appropriate.

MFC after:	1 week
Fixes:		8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2021-09-28 13:48:49 -04:00
parent ea5c0b7b14
commit 8b889b8953

View File

@ -615,7 +615,10 @@ mgb_init(if_ctx_t ctx)
MGB_RFE_ALLOW_UNICAST);
error = mii_mediachg(miid);
KASSERT(!error, ("mii_mediachg returned: %d", error));
/* Not much we can do if this fails. */
if (error)
device_printf(sc->dev, "%s: mii_mediachg returned %d", __func__,
error);
}
#ifdef DEBUG