summaryrefslogtreecommitdiff
path: root/fwdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fwdl.c')
-rw-r--r--fwdl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fwdl.c b/fwdl.c
index 48c8c3e..f775caa 100644
--- a/fwdl.c
+++ b/fwdl.c
@@ -60,7 +60,9 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw)
fw = priv->fw_ucode;
- mwl_fwcmd_reset(hw);
+ /* if reset fails, then dl will most likely hang */
+ if (mwl_fwcmd_reset(hw) < 0)
+ goto err_reset;
/* FW before jumping to boot rom, it will enable PCIe transaction retry,
* wait for boot code to stop it.
@@ -178,5 +180,6 @@ err_download:
mwl_fwcmd_reset(hw);
+err_reset:
return -EIO;
}