diff --git a/sys/arm64/arm64/gic_v3_its.c b/sys/arm64/arm64/gic_v3_its.c index aef6346e6e9b..c830c99cab98 100644 --- a/sys/arm64/arm64/gic_v3_its.c +++ b/sys/arm64/arm64/gic_v3_its.c @@ -565,7 +565,7 @@ its_init_cpu(struct gic_v3_its_softc *sc) * this function was called during GICv3 secondary initialization. */ if (sc == NULL) { - if (device_is_attached(its_sc->dev)) { + if (its_sc != NULL && device_is_attached(its_sc->dev)) { /* * XXX ARM64TODO: This is part of the workaround that * saves ITS software context for further use in