From: Johannes Berg Date: Thu, 7 May 2015 12:47:50 +0000 (+0200) Subject: iwlwifi: mvm: handle device start failure correctly X-Git-Tag: omap-for-v4.2/fixes-rc1^2~134^2~139^2^2~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d643c432223270844c4fd8dcfaec85404d36bde7;p=pandora-kernel.git iwlwifi: mvm: handle device start failure correctly 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 Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c index 0601445599f2..2f76fb23249a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c @@ -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)