summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@linux.intel.com>2012-11-28 15:48:44 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-10 00:51:49 +0100
commit27c31191b3d7ff32c266a5dbea344b9aa96ebf14 (patch)
treec8138ab74878bf69c1b5932c119da2c3d3b5c67b /net/nfc
parentf0c9103813b3045bd5b43220b6a78c9908a45d24 (diff)
downloadop-kernel-dev-27c31191b3d7ff32c266a5dbea344b9aa96ebf14.zip
op-kernel-dev-27c31191b3d7ff32c266a5dbea344b9aa96ebf14.tar.gz
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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c
index b4b8426..f30f6fe 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,
break;
default:
if (hdev->ops->event_received) {
- hdev->ops->event_received(hdev, gate, event, skb);
- return;
+ r = hdev->ops->event_received(hdev, gate, event, skb);
+ goto exit_noskb;
+ } else {
+ r = -EINVAL;
}
-
break;
}
exit:
kfree_skb(skb);
+exit_noskb:
if (r) {
/* TODO: There was an error dispatching the event,
* how to propagate up to nfc core?
OpenPOWER on IntegriCloud