Merged from sys/dev/sio/sio.c revision 1.418.

This commit is contained in:
nyan 2004-01-21 16:12:29 +00:00
parent cd3d56c01e
commit bfb36a1d62
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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);