summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/sio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sio/sio.c')
-rw-r--r--sys/dev/sio/sio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index bd842f4..be51ac3 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -508,8 +508,10 @@ sioprobe(dev, xrid, rclk, noprobe)
return (ENXIO);
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