X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fbluetooth%2Fhidp%2Fsock.c;h=f4dd02ca9a96d9acd1c73872aac795b6de68575b;hb=cb28a1bbdb4790378e7366d6c9ee1d2340b84f92;hp=1de2b6fbcac0d442a2d9073e145aa82e3eb9c1d4;hpb=1b8d7ae42d02e483ad94035cca851e4f7fbecb40;p=linux-2.6 diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c index 1de2b6fbca..f4dd02ca9a 100644 --- a/net/bluetooth/hidp/sock.c +++ b/net/bluetooth/hidp/sock.c @@ -86,13 +86,13 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long isock = sockfd_lookup(ca.intr_sock, &err); if (!isock) { - fput(csock->file); + sockfd_put(csock); return err; } if (csock->sk->sk_state != BT_CONNECTED || isock->sk->sk_state != BT_CONNECTED) { - fput(csock->file); - fput(isock->file); + sockfd_put(csock); + sockfd_put(isock); return -EBADFD; } @@ -101,8 +101,8 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long if (copy_to_user(argp, &ca, sizeof(ca))) err = -EFAULT; } else { - fput(csock->file); - fput(isock->file); + sockfd_put(csock); + sockfd_put(isock); } return err; @@ -255,7 +255,7 @@ static int hidp_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, &hidp_proto, 1); + sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &hidp_proto); if (!sk) return -ENOMEM;