Function sock_register() returns a negative integer on failure. In function caif_sktinit_module() defined in net/caif/caif_socket.c, the return value of sock_register() is checked. However, no matter whether the return value of sock_register() is zero, it will returns 0 (indicates success). I guess the symbol not "!" is a typo in the check statement at line 1111. Codes related to this bug are shown as below. caif_sktinit_module @@ net/caif/caif_socket.c 1108 static int __init caif_sktinit_module(void) 1109 { 1110 int err = sock_register(&caif_family_ops); 1111 if (!err) // use if(err) ? 1112 return err; 1113 return 0; 1114 } Thanks very much!
Created attachment 256413 [details] The patch fixes the bug The patch has been merged into the latest version of the Linux kernel. So I will close the bug.