summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev/osiop_pcctwo.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-04-15 22:29:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-04-15 22:29:50 +0000
commit91458ad805bc41a0dd72bd13c9e14bb53d18552a (patch)
tree99ac458e780818e6adcbf0890ab8cdd686237ea1 /sys/arch/mvme88k/dev/osiop_pcctwo.c
parent96353e114951faabfa1913f3e6b61e7419267edb (diff)
Invoke bus_space_unmap with the correct bus_space_handle_t upon attachment
failure.
Diffstat (limited to 'sys/arch/mvme88k/dev/osiop_pcctwo.c')
-rw-r--r--sys/arch/mvme88k/dev/osiop_pcctwo.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/arch/mvme88k/dev/osiop_pcctwo.c b/sys/arch/mvme88k/dev/osiop_pcctwo.c
index 518a5dd24ff..38d4dcfcea9 100644
--- a/sys/arch/mvme88k/dev/osiop_pcctwo.c
+++ b/sys/arch/mvme88k/dev/osiop_pcctwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop_pcctwo.c,v 1.3 2004/07/30 19:02:06 miod Exp $ */
+/* $OpenBSD: osiop_pcctwo.c,v 1.4 2006/04/15 22:29:49 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
*
@@ -68,12 +68,11 @@ osiop_pcctwo_match(struct device *parent, void *cf, void *aux)
int rc;
if (bus_space_map(ca->ca_iot, ca->ca_paddr, OSIOP_NREGS, 0, &ioh) != 0)
- return 0;
+ return (0);
rc = badvaddr((vaddr_t)bus_space_vaddr(ca->ca_iot, ioh), 4);
- bus_space_unmap(ca->ca_iot, ca->ca_paddr, OSIOP_NREGS);
if (rc == 0) {
- bus_space_unmap(ca->ca_iot, ca->ca_paddr, OSIOP_NREGS);
- return 1;
+ bus_space_unmap(ca->ca_iot, ioh, OSIOP_NREGS);
+ return (1);
}
/*
@@ -98,8 +97,8 @@ osiop_pcctwo_match(struct device *parent, void *cf, void *aux)
rc = badvaddr((vaddr_t)bus_space_vaddr(ca->ca_iot, ioh), 4);
}
- bus_space_unmap(ca->ca_iot, ca->ca_paddr, OSIOP_NREGS);
- return rc == 0;
+ bus_space_unmap(ca->ca_iot, ioh, OSIOP_NREGS);
+ return (rc == 0);
}
void