aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r--net/bluetooth/sco.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 79ffcdef0b7a..22a110f37abc 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -1003,6 +1003,11 @@ static int sco_sock_getsockopt(struct socket *sock, int level, int optname,
1003 1003
1004 case BT_SNDMTU: 1004 case BT_SNDMTU:
1005 case BT_RCVMTU: 1005 case BT_RCVMTU:
1006 if (sk->sk_state != BT_CONNECTED) {
1007 err = -ENOTCONN;
1008 break;
1009 }
1010
1006 if (put_user(sco_pi(sk)->conn->mtu, (u32 __user *)optval)) 1011 if (put_user(sco_pi(sk)->conn->mtu, (u32 __user *)optval))
1007 err = -EFAULT; 1012 err = -EFAULT;
1008 break; 1013 break;