diff options
author | Eric Lapuyade <eric.lapuyade@linux.intel.com> | 2012-11-28 09:48:44 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-09 18:51:49 -0500 |
commit | 27c31191b3d7ff32c266a5dbea344b9aa96ebf14 (patch) | |
tree | c8138ab74878bf69c1b5932c119da2c3d3b5c67b /net/nfc | |
parent | f0c9103813b3045bd5b43220b6a78c9908a45d24 (diff) |
NFC: Added error handling in event_received hci ops
There is no use to return an error if the caller doesn't get it.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
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? |