diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/bnep/sock.c | 4 | ||||
-rw-r--r-- | net/bluetooth/cmtp/sock.c | 4 | ||||
-rw-r--r-- | net/bluetooth/hidp/sock.c | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c index 9ebd3c64474d..81065e548a1f 100644 --- a/net/bluetooth/bnep/sock.c +++ b/net/bluetooth/bnep/sock.c | |||
@@ -94,7 +94,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
94 | return err; | 94 | return err; |
95 | 95 | ||
96 | if (nsock->sk->sk_state != BT_CONNECTED) { | 96 | if (nsock->sk->sk_state != BT_CONNECTED) { |
97 | fput(nsock->file); | 97 | sockfd_put(nsock); |
98 | return -EBADFD; | 98 | return -EBADFD; |
99 | } | 99 | } |
100 | 100 | ||
@@ -103,7 +103,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
103 | if (copy_to_user(argp, &ca, sizeof(ca))) | 103 | if (copy_to_user(argp, &ca, sizeof(ca))) |
104 | err = -EFAULT; | 104 | err = -EFAULT; |
105 | } else | 105 | } else |
106 | fput(nsock->file); | 106 | sockfd_put(nsock); |
107 | 107 | ||
108 | return err; | 108 | return err; |
109 | 109 | ||
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c index 783edab12ce8..8c7f7bc4e0ba 100644 --- a/net/bluetooth/cmtp/sock.c +++ b/net/bluetooth/cmtp/sock.c | |||
@@ -88,7 +88,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
88 | return err; | 88 | return err; |
89 | 89 | ||
90 | if (nsock->sk->sk_state != BT_CONNECTED) { | 90 | if (nsock->sk->sk_state != BT_CONNECTED) { |
91 | fput(nsock->file); | 91 | sockfd_put(nsock); |
92 | return -EBADFD; | 92 | return -EBADFD; |
93 | } | 93 | } |
94 | 94 | ||
@@ -97,7 +97,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
97 | if (copy_to_user(argp, &ca, sizeof(ca))) | 97 | if (copy_to_user(argp, &ca, sizeof(ca))) |
98 | err = -EFAULT; | 98 | err = -EFAULT; |
99 | } else | 99 | } else |
100 | fput(nsock->file); | 100 | sockfd_put(nsock); |
101 | 101 | ||
102 | return err; | 102 | return err; |
103 | 103 | ||
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c index 3292b956a7c4..f4dd02ca9a96 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 | |||
86 | 86 | ||
87 | isock = sockfd_lookup(ca.intr_sock, &err); | 87 | isock = sockfd_lookup(ca.intr_sock, &err); |
88 | if (!isock) { | 88 | if (!isock) { |
89 | fput(csock->file); | 89 | sockfd_put(csock); |
90 | return err; | 90 | return err; |
91 | } | 91 | } |
92 | 92 | ||
93 | if (csock->sk->sk_state != BT_CONNECTED || isock->sk->sk_state != BT_CONNECTED) { | 93 | if (csock->sk->sk_state != BT_CONNECTED || isock->sk->sk_state != BT_CONNECTED) { |
94 | fput(csock->file); | 94 | sockfd_put(csock); |
95 | fput(isock->file); | 95 | sockfd_put(isock); |
96 | return -EBADFD; | 96 | return -EBADFD; |
97 | } | 97 | } |
98 | 98 | ||
@@ -101,8 +101,8 @@ static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long | |||
101 | if (copy_to_user(argp, &ca, sizeof(ca))) | 101 | if (copy_to_user(argp, &ca, sizeof(ca))) |
102 | err = -EFAULT; | 102 | err = -EFAULT; |
103 | } else { | 103 | } else { |
104 | fput(csock->file); | 104 | sockfd_put(csock); |
105 | fput(isock->file); | 105 | sockfd_put(isock); |
106 | } | 106 | } |
107 | 107 | ||
108 | return err; | 108 | return err; |