Message ID | 20220412112300.106640-1-duoming@zju.edu.cn (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | None | expand |
diff --git a/drivers/nfc/nfcmrvl/fw_dnld.c b/drivers/nfc/nfcmrvl/fw_dnld.c index c22a4556db5..8188d466a01 100644 --- a/drivers/nfc/nfcmrvl/fw_dnld.c +++ b/drivers/nfc/nfcmrvl/fw_dnld.c @@ -116,7 +116,10 @@ static void fw_dnld_over(struct nfcmrvl_private *priv, u32 error) nfcmrvl_chip_halt(priv); } - nfc_fw_download_done(priv->ndev->nfc_dev, priv->fw_dnld.name, error); + spin_lock_irq(&priv->fw_dnld.lock); + if (priv->ndev->nfc_dev->fw_download_in_progress) + nfc_fw_download_done(priv->ndev->nfc_dev, priv->fw_dnld.name, error); + spin_unlock_irq(&priv->fw_dnld.lock); } static void fw_dnld_timeout(struct timer_list *t)