]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bluetooth/bnep/sock.c
Merge branch 'net-next-2.6-misc-20080612a' of git://git.linux-ipv6.org/gitroot/yoshfu...
[linux-2.6-omap-h63xx.git] / net / bluetooth / bnep / sock.c
index f718965f296c7c3cdd2b46453ffff644fd62fa53..8ffb57f2303a5124d93d405c083b32b419bd7ecb 100644 (file)
    SOFTWARE IS DISCLAIMED.
 */
 
-/*
- * $Id: sock.c,v 1.4 2002/08/04 21:23:58 maxk Exp $
- */
-
 #include <linux/module.h>
 
 #include <linux/types.h>
@@ -94,7 +90,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
                        return err;
 
                if (nsock->sk->sk_state != BT_CONNECTED) {
-                       fput(nsock->file);
+                       sockfd_put(nsock);
                        return -EBADFD;
                }
 
@@ -103,7 +99,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long
                        if (copy_to_user(argp, &ca, sizeof(ca)))
                                err = -EFAULT;
                } else
-                       fput(nsock->file);
+                       sockfd_put(nsock);
 
                return err;
 
@@ -213,7 +209,7 @@ static int bnep_sock_create(struct net *net, struct socket *sock, int protocol)
        if (sock->type != SOCK_RAW)
                return -ESOCKTNOSUPPORT;
 
-       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto, 1);
+       sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto);
        if (!sk)
                return -ENOMEM;
 
@@ -257,12 +253,10 @@ error:
        return err;
 }
 
-int __exit bnep_sock_cleanup(void)
+void __exit bnep_sock_cleanup(void)
 {
        if (bt_sock_unregister(BTPROTO_BNEP) < 0)
                BT_ERR("Can't unregister BNEP socket");
 
        proto_unregister(&bnep_proto);
-
-       return 0;
 }