diff options
-rw-r--r-- | sys/arm/xscale/ixp425/ixp425_npe.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm/xscale/ixp425/ixp425_npe.c b/sys/arm/xscale/ixp425/ixp425_npe.c index 2d5680d..c2e05ac 100644 --- a/sys/arm/xscale/ixp425/ixp425_npe.c +++ b/sys/arm/xscale/ixp425/ixp425_npe.c @@ -255,6 +255,8 @@ ixpnpe_attach(device_t dev) /* XXX M_BUS */ sc = malloc(sizeof(struct ixpnpe_softc), M_TEMP, M_WAITOK | M_ZERO); + if (sc == NULL) + panic("%s: Cannot allocate softc", device_get_name(dev)); sc->sc_dev = dev; sc->sc_iot = sa->sc_iot; mtx_init(&sc->sc_mtx, device_get_nameunit(dev), "npe driver", MTX_DEF); |