diff options
author | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2012-01-08 00:31:36 +0000 |
---|---|---|
committer | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2012-01-08 00:31:36 +0000 |
commit | 22808d2c653fcedb4305e4bb7429ec4a70e35503 (patch) | |
tree | 6c532cf626f653e99bba704e0c0b5f8d65d3f125 /sys/arch/luna88k | |
parent | ab438a4c8fb438961555c8310f75a91cca0d64b6 (diff) |
Make allocated memory zeroed. This fixes the problem that we got a
panic at attaching fb when we use the serial console.
ok miod@
Diffstat (limited to 'sys/arch/luna88k')
-rw-r--r-- | sys/arch/luna88k/dev/lunafb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/luna88k/dev/lunafb.c b/sys/arch/luna88k/dev/lunafb.c index 3afd53a4ccb..f1817832d70 100644 --- a/sys/arch/luna88k/dev/lunafb.c +++ b/sys/arch/luna88k/dev/lunafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lunafb.c,v 1.11 2010/12/26 15:40:59 miod Exp $ */ +/* $OpenBSD: lunafb.c,v 1.12 2012/01/08 00:31:35 aoyama Exp $ */ /* $NetBSD: lunafb.c,v 1.7.6.1 2002/08/07 01:48:34 lukem Exp $ */ /*- @@ -194,7 +194,8 @@ omfbattach(parent, self, args) } else { sc->sc_dc = (struct om_hwdevconfig *) - malloc(sizeof(struct om_hwdevconfig), M_DEVBUF, M_WAITOK); + malloc(sizeof(struct om_hwdevconfig), M_DEVBUF, + M_WAITOK | M_ZERO); omfb_getdevconfig(OMFB_FB_WADDR, sc->sc_dc); } printf(": %d x %d, %dbpp\n", sc->sc_dc->dc_wid, sc->sc_dc->dc_ht, |