diff options
| author | matt <matt@NetBSD.org> | 2009-01-11 07:40:02 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2009-01-11 07:40:02 +0000 |
| commit | eb01a7c3dfd6471635377879e0b16dd0874997dd (patch) | |
| tree | 12ee2bf120648c98449d845946240959ed7e29c0 /sys/dev | |
| parent | 74ed958e0fefdd83871b73fc2d81535cb555374d (diff) | |
Initialize sc->sc_dev before we use it.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/qbus/if_qt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/qbus/if_qt.c b/sys/dev/qbus/if_qt.c index 26438501559..4192cd5540e 100644 --- a/sys/dev/qbus/if_qt.c +++ b/sys/dev/qbus/if_qt.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_qt.c,v 1.15 2008/12/16 22:35:34 christos Exp $ */ +/* $NetBSD: if_qt.c,v 1.16 2009/01/11 07:40:02 matt Exp $ */ /* * Copyright (c) 1992 Steven M. Schultz * All rights reserved. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.15 2008/12/16 22:35:34 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_qt.c,v 1.16 2009/01/11 07:40:02 matt Exp $"); #include "opt_inet.h" #include "bpfilter.h" @@ -258,12 +258,13 @@ qtattach(device_t parent, device_t self, void *aux) struct ifnet *ifp = &sc->is_if; struct uba_attach_args *ua = aux; + sc->sc_dev = self; + uba_intr_establish(ua->ua_icookie, ua->ua_cvec, qtintr, sc, &sc->sc_intrcnt); evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, ua->ua_evcnt, device_xname(sc->sc_dev), "intr"); - sc->sc_dev = self; sc->sc_uh = device_private(parent); sc->sc_iot = ua->ua_iot; sc->sc_ioh = ua->ua_ioh; |
