iwlagn: check more error return code
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Tue, 5 Apr 2011 16:42:01 +0000 (09:42 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 7 Apr 2011 19:51:38 +0000 (15:51 -0400)
In alive notify, we should check return code instead of assume everything ok

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-ucode.c

index a7c9131..9c5abff 100644 (file)
@@ -432,6 +432,7 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
        unsigned long flags;
        int i, chan;
        u32 reg_val;
+       int ret;
 
        spin_lock_irqsave(&priv->lock, flags);
 
@@ -527,9 +528,14 @@ int iwlagn_alive_notify(struct iwl_priv *priv)
        iwl_clear_bits_prph(priv, APMG_PCIDEV_STT_REG,
                          APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
 
-       iwlagn_send_wimax_coex(priv);
+       ret = iwlagn_send_wimax_coex(priv);
+       if (ret)
+               return ret;
+
+       ret = iwlagn_set_Xtal_calib(priv);
+       if (ret)
+               return ret;
 
-       iwlagn_set_Xtal_calib(priv);
        return iwl_send_calib_results(priv);
 }