git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
NFC: nxp-nci: Release firmware when switching to FW mode fails
[pandora-kernel.git]
/
drivers
/
nfc
/
nxp-nci
/
firmware.c
diff --git
a/drivers/nfc/nxp-nci/firmware.c
b/drivers/nfc/nxp-nci/firmware.c
index
74f9820
..
5291797
100644
(file)
--- a/
drivers/nfc/nxp-nci/firmware.c
+++ b/
drivers/nfc/nxp-nci/firmware.c
@@
-234,8
+234,10
@@
int nxp_nci_fw_download(struct nci_dev *ndev, const char *firmware_name)
goto fw_download_exit;
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;
+ }
info->mode = NXP_NCI_MODE_FW;