aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/a2mp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index f986b9968bdb..d6bb096ba0f1 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -695,7 +695,13 @@ static void a2mp_chan_state_change_cb(struct l2cap_chan *chan, int state,
695static struct sk_buff *a2mp_chan_alloc_skb_cb(struct l2cap_chan *chan, 695static struct sk_buff *a2mp_chan_alloc_skb_cb(struct l2cap_chan *chan,
696 unsigned long len, int nb) 696 unsigned long len, int nb)
697{ 697{
698 return bt_skb_alloc(len, GFP_KERNEL); 698 struct sk_buff *skb;
699
700 skb = bt_skb_alloc(len, GFP_KERNEL);
701 if (!skb)
702 return ERR_PTR(-ENOMEM);
703
704 return skb;
699} 705}
700 706
701static struct l2cap_ops a2mp_chan_ops = { 707static struct l2cap_ops a2mp_chan_ops = {