diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-04-15 22:29:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-04-15 22:29:50 +0000 |
commit | 91458ad805bc41a0dd72bd13c9e14bb53d18552a (patch) | |
tree | 99ac458e780818e6adcbf0890ab8cdd686237ea1 /sys/arch/mvme88k | |
parent | 96353e114951faabfa1913f3e6b61e7419267edb (diff) |
Invoke bus_space_unmap with the correct bus_space_handle_t upon attachment
failure.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/dev/cl.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/osiop_pcctwo.c | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c index 78c7de302cf..08cd39db96a 100644 --- a/sys/arch/mvme88k/dev/cl.c +++ b/sys/arch/mvme88k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.50 2006/01/01 11:59:39 miod Exp $ */ +/* $OpenBSD: cl.c,v 1.51 2006/04/15 22:29:49 miod Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -231,7 +231,7 @@ clprobe(parent, self, aux) 0, &ioh) != 0) return 0; rc = badvaddr((vaddr_t)bus_space_vaddr(ca->ca_iot, ioh), 1); - bus_space_unmap(ca->ca_iot, ca->ca_paddr, CD2400_SIZE); + bus_space_unmap(ca->ca_iot, ioh, CD2400_SIZE); return rc == 0; } 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 |