From 3670a5a5404dc6d0f145a3ac6fe6c74d85832d64 Mon Sep 17 00:00:00 2001 From: Eric Lapuyade Date: Mon, 11 Jun 2012 13:36:52 +0200 Subject: [PATCH] --- yaml --- r: 315281 b: refs/heads/master c: 72b06f75fea45fa861f2e137bc94e56aab306c4b h: refs/heads/master i: 315279: 236ffd0d33ff15203407924ec996995282dd08e8 v: v3 --- [refs] | 2 +- trunk/net/nfc/hci/core.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 4eeb1571bd75..e5d91e74d496 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1c215d79a18a22fc6c2a9ef8658d426bac492b58 +refs/heads/master: 72b06f75fea45fa861f2e137bc94e56aab306c4b diff --git a/trunk/net/nfc/hci/core.c b/trunk/net/nfc/hci/core.c index 1a009d554fd7..7d4fdbc06a98 100644 --- a/trunk/net/nfc/hci/core.c +++ b/trunk/net/nfc/hci/core.c @@ -717,12 +717,18 @@ void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev) } EXPORT_SYMBOL(nfc_hci_get_clientdata); -void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err) +static void nfc_hci_failure(struct nfc_hci_dev *hdev, int err) { - /* TODO: lower layer has permanent failure. + /* + * TODO: lower layer has permanent failure. * complete potential HCI command or send an empty tag discovered event */ } + +void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err) +{ + nfc_hci_failure(hdev, err); +} EXPORT_SYMBOL(nfc_hci_driver_failure); void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb) @@ -755,9 +761,8 @@ void nfc_hci_recv_frame(struct nfc_hci_dev *hdev, struct sk_buff *skb) hcp_skb = nfc_alloc_recv_skb(NFC_HCI_HCP_PACKET_HEADER_LEN + msg_len, GFP_KERNEL); if (hcp_skb == NULL) { - /* TODO ELa: cannot deliver HCP message. How to - * propagate error up? - */ + nfc_hci_failure(hdev, -ENOMEM); + return; } *skb_put(hcp_skb, NFC_HCI_HCP_PACKET_HEADER_LEN) = pipe;