I've got such a function:
void cleanup_module(void)
{
/*
* Unregister the device
*/
if(unregister_chrdev(Major, DEVICE_NAME)<0)
printk(KERN_ALERT "Error in unregister_chrdev:\n");
}
and error:
/home/student/kernel/hello.c: In function ‘cleanup_module’:
/home/student/kernel/hello.c:39:2: error: void value not ignored as it ought to be
This line is the one with if statement. Do you know what I'm doing wrong?