aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index e3bb11ca4235..7f0781e4326f 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -57,7 +57,7 @@
57 57
58#define VERSION "2.8" 58#define VERSION "2.8"
59 59
60static struct proto_ops l2cap_sock_ops; 60static const struct proto_ops l2cap_sock_ops;
61 61
62static struct bt_sock_list l2cap_sk_list = { 62static struct bt_sock_list l2cap_sk_list = {
63 .lock = RW_LOCK_UNLOCKED 63 .lock = RW_LOCK_UNLOCKED
@@ -767,8 +767,9 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
767 767
768 BT_DBG("sock %p, sk %p", sock, sk); 768 BT_DBG("sock %p, sk %p", sock, sk);
769 769
770 if (sk->sk_err) 770 err = sock_error(sk);
771 return sock_error(sk); 771 if (err)
772 return err;
772 773
773 if (msg->msg_flags & MSG_OOB) 774 if (msg->msg_flags & MSG_OOB)
774 return -EOPNOTSUPP; 775 return -EOPNOTSUPP;
@@ -2160,7 +2161,7 @@ static ssize_t l2cap_sysfs_show(struct class *dev, char *buf)
2160 2161
2161static CLASS_ATTR(l2cap, S_IRUGO, l2cap_sysfs_show, NULL); 2162static CLASS_ATTR(l2cap, S_IRUGO, l2cap_sysfs_show, NULL);
2162 2163
2163static struct proto_ops l2cap_sock_ops = { 2164static const struct proto_ops l2cap_sock_ops = {
2164 .family = PF_BLUETOOTH, 2165 .family = PF_BLUETOOTH,
2165 .owner = THIS_MODULE, 2166 .owner = THIS_MODULE,
2166 .release = l2cap_sock_release, 2167 .release = l2cap_sock_release,