From: Johannes Berg Date: Tue, 30 Jul 2013 18:10:46 +0000 (+0200) Subject: iwlwifi: pcie: fix resume when no opmode is present X-Git-Tag: v3.12-rc1~132^2~84^2^2~55^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eeb89ab1f081a62bee1695d82442996b99a5b2b3;p=kernel%2Fkernel-generic.git iwlwifi: pcie: fix resume when no opmode is present If no opmode is present during suspend/resume (i.e. if the iwldvm or iwlmvm isn't loaded) the driver crashes during resume, trying to call the rfkill notification. Avoid that, and also don't enable the rfkill interrupt in this case (to avoid crashing trying to handle the interrupt later.) Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index cec0c89..601ee59 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -825,6 +825,9 @@ static int iwl_trans_pcie_resume(struct iwl_trans *trans) { bool hw_rfkill; + if (!trans->op_mode) + return 0; + iwl_enable_rfkill_int(trans); hw_rfkill = iwl_is_rfkill_set(trans);