Commit 0b4a66a3 authored by Wang Hai's avatar Wang Hai Committed by David S. Miller

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: 3c1c0f5d ("NFC: NCI: Fix nci_register_device init sequence")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 12915174
...@@ -1228,10 +1228,13 @@ int nci_register_device(struct nci_dev *ndev) ...@@ -1228,10 +1228,13 @@ int nci_register_device(struct nci_dev *ndev)
rc = nfc_register_device(ndev->nfc_dev); rc = nfc_register_device(ndev->nfc_dev);
if (rc) if (rc)
goto destroy_rx_wq_exit; goto destroy_tx_wq_exit;
goto exit; goto exit;
destroy_tx_wq_exit:
destroy_workqueue(ndev->tx_wq);
destroy_rx_wq_exit: destroy_rx_wq_exit:
destroy_workqueue(ndev->rx_wq); destroy_workqueue(ndev->rx_wq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment