diff options
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/hci/core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index b4b84268653d..f30f6fe815b4 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c | |||
@@ -323,16 +323,18 @@ void nfc_hci_event_received(struct nfc_hci_dev *hdev, u8 pipe, u8 event, | |||
323 | break; | 323 | break; |
324 | default: | 324 | default: |
325 | if (hdev->ops->event_received) { | 325 | if (hdev->ops->event_received) { |
326 | hdev->ops->event_received(hdev, gate, event, skb); | 326 | r = hdev->ops->event_received(hdev, gate, event, skb); |
327 | return; | 327 | goto exit_noskb; |
328 | } else { | ||
329 | r = -EINVAL; | ||
328 | } | 330 | } |
329 | |||
330 | break; | 331 | break; |
331 | } | 332 | } |
332 | 333 | ||
333 | exit: | 334 | exit: |
334 | kfree_skb(skb); | 335 | kfree_skb(skb); |
335 | 336 | ||
337 | exit_noskb: | ||
336 | if (r) { | 338 | if (r) { |
337 | /* TODO: There was an error dispatching the event, | 339 | /* TODO: There was an error dispatching the event, |
338 | * how to propagate up to nfc core? | 340 | * how to propagate up to nfc core? |