Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/cardbus In tlp_cardbus_detach(), only unmap the bus ...



details:   https://anonhg.NetBSD.org/src/rev/5a2f4ec2a04d
branches:  trunk
changeset: 483970:5a2f4ec2a04d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Mar 22 01:35:14 2000 +0000

description:
In tlp_cardbus_detach(), only unmap the bus space if we were able to
map it in the first place.  Pointed out by enami%netbsd.org@localhost.

diffstat:

 sys/dev/cardbus/if_tlp_cardbus.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 447fc838ee92 -r 5a2f4ec2a04d sys/dev/cardbus/if_tlp_cardbus.c
--- a/sys/dev/cardbus/if_tlp_cardbus.c  Wed Mar 22 01:09:34 2000 +0000
+++ b/sys/dev/cardbus/if_tlp_cardbus.c  Wed Mar 22 01:35:14 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tlp_cardbus.c,v 1.21 2000/03/19 21:45:24 thorpej Exp $      */
+/*     $NetBSD: if_tlp_cardbus.c,v 1.22 2000/03/22 01:35:14 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -392,8 +392,9 @@
        /*
         * Release bus space and close window.
         */
-       Cardbus_mapreg_unmap(ct, csc->sc_bar_reg, sc->sc_st, sc->sc_sh, 
-           csc->sc_mapsize);
+       if (csc->sc_bar_reg != 0)
+               Cardbus_mapreg_unmap(ct, csc->sc_bar_reg,
+                   sc->sc_st, sc->sc_sh, csc->sc_mapsize);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index