summaryrefslogtreecommitdiffstats
path: root/net/nfc/hci/hcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/nfc/hci/hcp.c')
-rw-r--r--net/nfc/hci/hcp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/nfc/hci/hcp.c b/net/nfc/hci/hcp.c
index bc308a7..b6b4109 100644
--- a/net/nfc/hci/hcp.c
+++ b/net/nfc/hci/hcp.c
@@ -105,6 +105,13 @@ int nfc_hci_hcp_message_tx(struct nfc_hci_dev *hdev, u8 pipe,
}
mutex_lock(&hdev->msg_tx_mutex);
+
+ if (hdev->shutting_down) {
+ err = -ESHUTDOWN;
+ mutex_unlock(&hdev->msg_tx_mutex);
+ goto out_skb_err;
+ }
+
list_add_tail(&cmd->msg_l, &hdev->msg_tx_queue);
mutex_unlock(&hdev->msg_tx_mutex);
OpenPOWER on IntegriCloud