summaryrefslogtreecommitdiff
path: root/sys/dev/sbus/cgsix.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-03-03 01:41:12 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-03-03 01:41:12 +0000
commitef616ecd1d0418334dd23097fa6a34999a8cca17 (patch)
treeaba6784f014328c531afb9f2aa2fd5d390acbc06 /sys/dev/sbus/cgsix.c
parenteb33216a511d6e8f0e1ca78e6fd7a8bc754a017f (diff)
Do not unmap more memory than we mapped earlier, in case of attachment failure.
Diffstat (limited to 'sys/dev/sbus/cgsix.c')
-rw-r--r--sys/dev/sbus/cgsix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sbus/cgsix.c b/sys/dev/sbus/cgsix.c
index f991ac09926..78e3e4451e3 100644
--- a/sys/dev/sbus/cgsix.c
+++ b/sys/dev/sbus/cgsix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgsix.c,v 1.47 2005/03/01 21:23:36 miod Exp $ */
+/* $OpenBSD: cgsix.c,v 1.48 2005/03/03 01:41:11 miod Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -254,7 +254,7 @@ fail_intr:
fail_fbc:
bus_space_unmap(sa->sa_bustag, sc->sc_tec_regs, CGSIX_TEC_SIZE);
fail_tec:
- bus_space_unmap(sa->sa_bustag, sc->sc_vid_regs, CGSIX_VID_SIZE);
+ bus_space_unmap(sa->sa_bustag, sc->sc_vid_regs, sc->sc_sunfb.sf_fbsize);
fail_vid:
bus_space_unmap(sa->sa_bustag, sc->sc_thc_regs, CGSIX_THC_SIZE);
fail_thc: