From 9ce630976e8225d082aff0c39e113e74275beb58 Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Wed, 21 Jan 2004 16:12:29 +0000 Subject: [PATCH] Merged from sys/dev/sio/sio.c revision 1.418. --- sys/pc98/cbus/sio.c | 4 +++- sys/pc98/pc98/sio.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index a9d187953090..4e3467110e1c 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -884,8 +884,10 @@ sioprobe(dev, xrid, rclk, noprobe) #endif com = malloc(sizeof(*com), M_DEVBUF, M_NOWAIT | M_ZERO); - if (com == NULL) + if (com == NULL) { + bus_release_resource(dev, SYS_RES_IOPORT, rid, port); return (ENOMEM); + } device_set_softc(dev, com); com->bst = rman_get_bustag(port); com->bsh = rman_get_bushandle(port); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index a9d187953090..4e3467110e1c 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -884,8 +884,10 @@ sioprobe(dev, xrid, rclk, noprobe) #endif com = malloc(sizeof(*com), M_DEVBUF, M_NOWAIT | M_ZERO); - if (com == NULL) + if (com == NULL) { + bus_release_resource(dev, SYS_RES_IOPORT, rid, port); return (ENOMEM); + } device_set_softc(dev, com); com->bst = rman_get_bustag(port); com->bsh = rman_get_bushandle(port);