diff options
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/tga.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/tga.c b/sys/dev/pci/tga.c index b1c1847d31e..1cfdf4e77d6 100644 --- a/sys/dev/pci/tga.c +++ b/sys/dev/pci/tga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tga.c,v 1.6 2001/03/19 00:18:05 aaron Exp $ */ +/* $OpenBSD: tga.c,v 1.7 2001/05/16 19:33:33 mickey Exp $ */ /* $NetBSD: tga.c,v 1.31 2001/02/11 19:34:58 nathanw Exp $ */ /* @@ -426,7 +426,9 @@ tgaattach(parent, self, aux) sc->nscreens = 1; } else { sc->sc_dc = (struct tga_devconfig *) - malloc(sizeof(struct tga_devconfig), M_DEVBUF, M_WAITOK); + malloc(sizeof(struct tga_devconfig), M_DEVBUF, M_NOWAIT); + if (sc->sc_dc == NULL) + return; bzero(sc->sc_dc, sizeof(struct tga_devconfig)); tga_getdevconfig(pa->pa_memt, pa->pa_pc, pa->pa_tag, sc->sc_dc); |