Module Init And Cleanup Functions (Cont.) The 'init_module' function is invoked after the module is created. If it fails to initialize the module, it should return 0. Otherwise, it should return 1. The 'clean_module' function is invoked when the system attempts to unload (thus destroy) the module. It has no saying regarding whether cleanup succeeded or failed. In a device driver module, the 'init_module' function will normally detect the controlled device(s), allocate IRQs and DMA channels, and reset the device.