summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo@padovan.org>2012-04-06 20:15:47 -0300
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 01:40:26 -0300
commit9033894722ec595053c92bfa4359b37e7bc91b78 (patch)
tree33707a9d67a8d024ebe78551ec8d1bded53666b8 /net/bluetooth/l2cap_sock.c
parentbd4b165312bacbf1e732cbc22c141362cfb5fda3 (diff)
Bluetooth: Remove err parameter from alloc_skb()
Use ERR_PTR maginc instead. Signed-off-by: Gustavo Padovan <gustavo@padovan.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index ae1d78ee041..46126cbc9de 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -927,12 +927,16 @@ static void l2cap_sock_state_change_cb(void *data, int state)
}
static struct sk_buff *l2cap_sock_alloc_skb_cb(struct l2cap_chan *chan,
- unsigned long len, int nb,
- int *err)
+ unsigned long len, int nb)
{
- struct sock *sk = chan->sk;
+ struct sk_buff *skb;
+ int err;
+
+ skb = bt_skb_send_alloc(chan->sk, len, nb, &err);
+ if (!skb)
+ return ERR_PTR(err);
- return bt_skb_send_alloc(sk, len, nb, err);
+ return skb;
}
static struct l2cap_ops l2cap_chan_ops = {