我有这样的功能:
void cleanup_module(void)
{
/*
* Unregister the device
*/
if(unregister_chrdev(Major, DEVICE_NAME)<0)
printk(KERN_ALERT "Error in unregister_chrdev:\n");
}
和错误:
/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
这一行是带有 if 语句的行。你知道我做错了什么吗?