Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp700/dev Don't panic if bus_space_map fails. Just ...



details:   https://anonhg.NetBSD.org/src/rev/5fdc30783268
branches:  trunk
changeset: 751990:5fdc30783268
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Feb 10 20:33:27 2010 +0000

description:
Don't panic if bus_space_map fails. Just report the error and return.

diffstat:

 sys/arch/hp700/dev/wax.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 0136277336d4 -r 5fdc30783268 sys/arch/hp700/dev/wax.c
--- a/sys/arch/hp700/dev/wax.c  Wed Feb 10 20:32:34 2010 +0000
+++ b/sys/arch/hp700/dev/wax.c  Wed Feb 10 20:33:27 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wax.c,v 1.14 2009/11/03 05:07:25 snj Exp $     */
+/*     $NetBSD: wax.c,v 1.15 2010/02/10 20:33:27 skrll Exp $   */
 
 /*     $OpenBSD: wax.c,v 1.1 1998/11/23 03:04:10 mickey Exp $  */
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wax.c,v 1.14 2009/11/03 05:07:25 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wax.c,v 1.15 2010/02/10 20:33:27 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -132,8 +132,10 @@
         * Map the WAX interrupt registers.
         */
        if (bus_space_map(ca->ca_iot, ca->ca_hpa, sizeof(struct wax_regs),
-           0, &ioh))
-               panic("waxattach: can't map interrupt registers");
+           0, &ioh)) {
+               aprint_error(": can't map interrupt registers\n");
+               return;
+       }
        sc->sc_regs = (struct wax_regs *)ca->ca_hpa;
 
        /* interrupts guts */



Home | Main Index | Thread Index | Old Index