Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341502
b: refs/heads/master
c: 74a5b96
h: refs/heads/master
v: v3
  • Loading branch information
Eric Lapuyade authored and Samuel Ortiz committed Nov 19, 2012
1 parent 05361c3 commit 755bb01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 23f7e6d0d060e2eb0be1daef818d030025453b44
refs/heads/master: 74a5b96621a50a6c41377bad65149930b050df98
13 changes: 8 additions & 5 deletions trunk/net/nfc/hci/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
struct sk_buff *skb)
{
int r = 0;
u8 gate = nfc_hci_pipe2gate(hdev, pipe);

if (gate == 0xff) {
pr_err("Discarded event %x to unopened pipe %x\n", event, pipe);
goto exit;
}

switch (event) {
case NFC_HCI_EVT_TARGET_DISCOVERED:
Expand All @@ -309,14 +315,11 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event,
goto exit;
}

r = nfc_hci_target_discovered(hdev,
nfc_hci_pipe2gate(hdev, pipe));
r = nfc_hci_target_discovered(hdev, gate);
break;
default:
if (hdev->ops->event_received) {
hdev->ops->event_received(hdev,
nfc_hci_pipe2gate(hdev, pipe),
event, skb);
hdev->ops->event_received(hdev, gate, event, skb);
return;
}

Expand Down

0 comments on commit 755bb01

Please sign in to comment.