From b76e5c586aa91c7795193e0db43fcfc7a0645446 Mon Sep 17 00:00:00 2001 From: mcr Date: Fri, 6 Jul 2001 18:01:26 +0000 Subject: [PATCH] added some error checking on return from rbus_new_root_share(). --- sys/arch/i386/i386/rbus_machdep.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/arch/i386/i386/rbus_machdep.c b/sys/arch/i386/i386/rbus_machdep.c index 7e9750501672..b9b4e15c0125 100644 --- a/sys/arch/i386/i386/rbus_machdep.c +++ b/sys/arch/i386/i386/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: rbus_machdep.c,v 1.11 2001/04/25 03:31:23 thorpej Exp $ */ +/* $NetBSD: rbus_machdep.c,v 1.12 2001/07/06 18:01:26 mcr Exp $ */ /* * Copyright (c) 1999 @@ -111,14 +111,19 @@ rbus_pccbb_parent_io(pa) struct extent *ex; bus_addr_t start; bus_size_t size; + rbus_tag_t ret; #ifdef PCIBIOS_ADDR_FIXUP ex = pciaddr.extent_port; #else extern struct extent *ioport_ex; ex = ioport_ex; #endif - start = 0x2000; - size = 0x1000; + start = 0x4000; + size = 0x2000; - return rbus_new_root_share(pa->pa_iot, ex, start, size, 0); + ret = rbus_new_root_share(pa->pa_iot, ex, start, size, 0); + if(ret == NULL) { + panic("failed to alloc I/O space"); + } + return ret; }