diff --git a/src/add-ons/kernel/drivers/network/rtl8139/driver.c b/src/add-ons/kernel/drivers/network/rtl8139/driver.c index c3525efb26..4cd55c2d4a 100644 --- a/src/add-ons/kernel/drivers/network/rtl8139/driver.c +++ b/src/add-ons/kernel/drivers/network/rtl8139/driver.c @@ -910,9 +910,6 @@ close_hook (void* cookie) WRITE_8( Command , 0 ); WRITE_16( IMR , 0 ); - // mark this device as closed - gDeviceOpenMask &= ~(1L << data->device_id); - return B_OK; } @@ -941,6 +938,9 @@ free_hook (void* cookie) //Finally, free the cookie free( data ); + // mark this device as closed + gDeviceOpenMask &= ~(1L << data->device_id); + //Put the pci module put_module( B_PCI_MODULE_NAME );