sock: struct proto hash function may error
[cascardo/linux.git] / net / ipv4 / raw.c
index bc35f18..d635251 100644 (file)
@@ -93,7 +93,7 @@ static struct raw_hashinfo raw_v4_hashinfo = {
        .lock = __RW_LOCK_UNLOCKED(raw_v4_hashinfo.lock),
 };
 
-void raw_hash_sk(struct sock *sk)
+int raw_hash_sk(struct sock *sk)
 {
        struct raw_hashinfo *h = sk->sk_prot->h.raw_hash;
        struct hlist_head *head;
@@ -104,6 +104,8 @@ void raw_hash_sk(struct sock *sk)
        sk_add_node(sk, head);
        sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
        write_unlock_bh(&h->lock);
+
+       return 0;
 }
 EXPORT_SYMBOL_GPL(raw_hash_sk);