X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=net%2Fbluetooth%2Fcmtp%2Fsock.c;h=16b0fad74f6e82d6a9ec0f5c98725a50fd89757a;hb=418f19ea17a99421b22a64e101e14b6a16bed66d;hp=cf700c20d11eb8915d901914ce3a02e8b546d838;hpb=dcf397f037f52add9945eced57ca300ab6a4413c;p=linux-2.6-omap-h63xx.git diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c index cf700c20d11..16b0fad74f6 100644 --- a/net/bluetooth/cmtp/sock.c +++ b/net/bluetooth/cmtp/sock.c @@ -43,11 +43,6 @@ #include "cmtp.h" -#ifndef CONFIG_BT_CMTP_DEBUG -#undef BT_DBG -#define BT_DBG(D...) -#endif - static int cmtp_sock_release(struct socket *sock) { struct sock *sk = sock->sk; @@ -88,7 +83,7 @@ static int cmtp_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; } @@ -97,7 +92,7 @@ static int cmtp_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; @@ -204,7 +199,7 @@ static int cmtp_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, &cmtp_proto, 1); + sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &cmtp_proto); if (!sk) return -ENOMEM;