summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2004-01-21 16:12:29 +0000
committernyan <nyan@FreeBSD.org>2004-01-21 16:12:29 +0000
commitf36f9e2c2f5d60bbae24bc17caca130f87324a72 (patch)
tree4e06e0882ff8439ae5cb8c2c24d1ad0b7c18e1ea /sys/pc98
parente8cce017e5f85b6df1a84cf06bb09d2401728084 (diff)
downloadFreeBSD-src-f36f9e2c2f5d60bbae24bc17caca130f87324a72.zip
FreeBSD-src-f36f9e2c2f5d60bbae24bc17caca130f87324a72.tar.gz
Merged from sys/dev/sio/sio.c revision 1.418.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/cbus/sio.c4
-rw-r--r--sys/pc98/pc98/sio.c4
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);
OpenPOWER on IntegriCloud