mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]>
This commit is contained in:
parent
f0c9103813
commit
27c31191b3
3 changed files with 20 additions and 19 deletions
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Reference in a new issue