X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fbluetooth%2Fdtl1_cs.c;h=0e99def8a1e3886f9abab5591343600515943efb;hb=46009c8bcd5d7c9fcbfc17d0455a471bea5be4d4;hp=a71a240611e0ef0cac35dabd2097aaeeab87d04e;hpb=1465887cfe79889273e3fd3aaf862e7ec3ee244f;p=linux-2.6 diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index a71a240611..0e99def8a1 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c @@ -20,7 +20,6 @@ * */ -#include #include #include @@ -423,6 +422,9 @@ static int dtl1_hci_send_frame(struct sk_buff *skb) nsh.len = skb->len; s = bt_skb_alloc(NSHL + skb->len + 1, GFP_ATOMIC); + if (!s) + return -ENOMEM; + skb_reserve(s, NSHL); memcpy(skb_put(s, skb->len), skb->data, skb->len); if (skb->len & 0x0001) @@ -482,6 +484,7 @@ static int dtl1_open(dtl1_info_t *info) hdev->type = HCI_PCCARD; hdev->driver_data = info; + SET_HCIDEV_DEV(hdev, &info->p_dev->dev); hdev->open = dtl1_hci_open; hdev->close = dtl1_hci_close;