diff options
author | Wang Hai <wanghai38@huawei.com> | 2020-07-17 15:10:16 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-17 13:08:08 -0700 |
commit | 0b4a66a389d1ff5dab29f688fcfe36482bc889a2 (patch) | |
tree | 426d12961913ab9fe5a4377902bf2bdfabe45560 /net/nfc | |
parent | 1291517462f7fc667ab780d92955f5796f4fd6af (diff) |
nfc: nci: add missed destroy_workqueue in nci_register_device
When nfc_register_device fails in nci_register_device,
destroy_workqueue() shouled be called to destroy ndev->tx_wq.
Fixes: 3c1c0f5dc80b ("NFC: NCI: Fix nci_register_device init sequence")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/nci/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index 7cd524884304..78ea8c94dcba 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -1228,10 +1228,13 @@ int nci_register_device(struct nci_dev *ndev) rc = nfc_register_device(ndev->nfc_dev); if (rc) - goto destroy_rx_wq_exit; + goto destroy_tx_wq_exit; goto exit; +destroy_tx_wq_exit: + destroy_workqueue(ndev->tx_wq); + destroy_rx_wq_exit: destroy_workqueue(ndev->rx_wq); |