init suspiciously returned 19, it should follow 0/-En解决思路

问题描述:在调试linux 内核的过程中,加载内核的时候,遇到了这样的一个错误:



sys_init_module: 'CC2500'->init suspiciously returned 19, it should follow 0/-En
sys_init_module: loading module anyway...                                       
Backtrace:                                                                      
[<c0035270>] (dump_backtrace+0x0/0x10c) from [<c039847c>] (dump_stack+0x18/0x1c)
r7:00000000 r6:bf0461f4 r5:00000013 r4:0000592c                                
[<c0398464>] (dump_stack+0x0/0x1c) from [<c0070530>] (sys_init_module+0x194/0x2)
[<c007039c>] (sys_init_module+0x0/0x204) from [<c0030f20>] (ret_fast_syscall+0x)
r7:00000080 r6:bedcbd08 r5:00000000 r4:4001d838   


检查模块也没有什么大的错误,为什么会出现这个问题呢?
经过阅读错误,并且上网查找,证明是初始化模块的过程中,没有返回值(第一行不写了么:sys_init_module: 'CC2500'->init suspiciously returned 19, it should follow 0/-En)
因此,在初始化的最后加上 return 0就好了

你可能感兴趣的:(init suspiciously returned 19, it should follow 0/-En解决思路)