iwlwifi: mvm: handle device start failure correctly
authorJohannes Berg <johannes.berg@intel.com>
Thu, 7 May 2015 12:47:50 +0000 (14:47 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Thu, 28 May 2015 10:35:15 +0000 (13:35 +0300)
If the device fails to start correctly prior to loading the
regular runtime firmware (after having run the INIT firmware),
treat that error correctly by actually checking the return
value of _iwl_trans_start_hw() and stopping the device again
before returning an error.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/fw.c

index 0601445599f2b98e51e2fc08bcb320ec7f78cb2c..2f76fb23249a7d814516bcce810b71425a941c3f 100644 (file)
@@ -662,9 +662,9 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
                 * device that are triggered by the INIT firwmare (MFUART).
                 */
                _iwl_trans_stop_device(mvm->trans, false);
-               _iwl_trans_start_hw(mvm->trans, false);
+               ret = _iwl_trans_start_hw(mvm->trans, false);
                if (ret)
-                       return ret;
+                       goto error;
        }
 
        if (iwlmvm_mod_params.init_dbg)