put modules on error
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22259 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef317e11d4
commit
5d7f50f66c
|
@ -131,8 +131,10 @@ init_driver(void)
|
|||
}
|
||||
|
||||
status = init_lock(&gLock, "intel extreme ksync");
|
||||
if (status < B_OK)
|
||||
if (status < B_OK) {
|
||||
put_module(B_PCI_MODULE_NAME);
|
||||
return status;
|
||||
}
|
||||
|
||||
// find devices
|
||||
|
||||
|
|
|
@ -155,6 +155,8 @@ status_t init_driver( void )
|
|||
devices = (radeon_devices *)calloc( 1, sizeof( radeon_devices ));
|
||||
if( devices == NULL ) {
|
||||
put_module(B_PCI_MODULE_NAME);
|
||||
if (agp_bus != NULL)
|
||||
put_module(B_AGP_MODULE_NAME);
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
|
@ -177,7 +179,8 @@ void uninit_driver( void )
|
|||
|
||||
put_module( B_PCI_MODULE_NAME );
|
||||
/* put the agp module away if it's there */
|
||||
if (agp_bus) put_module(B_AGP_MODULE_NAME);
|
||||
if (agp_bus)
|
||||
put_module(B_AGP_MODULE_NAME);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -284,6 +284,9 @@ init_driver(void) {
|
|||
/* driver private data */
|
||||
pd = (DeviceData *)calloc(1, sizeof(DeviceData));
|
||||
if (!pd) {
|
||||
if (agp_bus)
|
||||
put_module(B_AGP_MODULE_NAME);
|
||||
put_module(B_ISA_MODULE_NAME);
|
||||
put_module(B_PCI_MODULE_NAME);
|
||||
return B_ERROR;
|
||||
}
|
||||
|
@ -324,7 +327,8 @@ void uninit_driver(void) {
|
|||
put_module(B_ISA_MODULE_NAME);
|
||||
|
||||
/* put the agp module away if it's there */
|
||||
if (agp_bus) put_module(B_AGP_MODULE_NAME);
|
||||
if (agp_bus)
|
||||
put_module(B_AGP_MODULE_NAME);
|
||||
}
|
||||
|
||||
static status_t map_device(device_info *di)
|
||||
|
|
Loading…
Reference in New Issue