提交 9421ce10 编写于 作者: S Samuel Ortiz

NFC: nxp-nci: Release firmware when switching to FW mode fails

In that case, the firmware work will never be scheduled, will
never complete and thus the firmware will never be released.
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 2b591257
...@@ -234,8 +234,10 @@ int nxp_nci_fw_download(struct nci_dev *ndev, const char *firmware_name) ...@@ -234,8 +234,10 @@ int nxp_nci_fw_download(struct nci_dev *ndev, const char *firmware_name)
goto fw_download_exit; goto fw_download_exit;
r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_FW); r = info->phy_ops->set_mode(info->phy_id, NXP_NCI_MODE_FW);
if (r < 0) if (r < 0) {
release_firmware(fw_info->fw);
goto fw_download_exit; goto fw_download_exit;
}
info->mode = NXP_NCI_MODE_FW; info->mode = NXP_NCI_MODE_FW;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册