summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-03 06:43:40 +0200
committerDavid S. Miller <davem@davemloft.net>2010-05-03 07:02:06 +0200
commit7ef527377b88ff05fb122a47619ea506c631c914 (patch)
tree2c2e774527d5f591b975834f43e8c6fd12fb38f2 /net/bluetooth/l2cap.c
parentnet: Inline skb_pull() in eth_type_trans(). (diff)
parentnet: fix compile error due to double return type in SOCK_DEBUG (diff)
downloadlinux-7ef527377b88ff05fb122a47619ea506c631c914.tar.xz
linux-7ef527377b88ff05fb122a47619ea506c631c914.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r--net/bluetooth/l2cap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index c1e60eed5a97..864c76f4a678 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1626,7 +1626,10 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
/* Connectionless channel */
if (sk->sk_type == SOCK_DGRAM) {
skb = l2cap_create_connless_pdu(sk, msg, len);
- err = l2cap_do_send(sk, skb);
+ if (IS_ERR(skb))
+ err = PTR_ERR(skb);
+ else
+ err = l2cap_do_send(sk, skb);
goto done;
}