diff options
-rw-r--r-- | sys/pc98/cbus/sio.c | 4 | ||||
-rw-r--r-- | 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 a9d1879..4e34671 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 a9d1879..4e34671 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); |