Checking for recovery state just before re-arming hb_timer is not
necessary, this should be done at the begining of the timer instead.
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
        struct ath6kl *ar = (struct ath6kl *) data;
        int err;
 
-       if (!ar->fw_recovery.enable)
+       if (!ar->fw_recovery.enable || (ar->state == ATH6KL_STATE_RECOVERY))
                return;
 
        if (ar->fw_recovery.hb_pending)
                ath6kl_warn("Failed to send hb challenge request, err:%d\n",
                            err);
 
-       if ((ar->state == ATH6KL_STATE_RECOVERY) || !ar->fw_recovery.enable)
-               return;
-
        mod_timer(&ar->fw_recovery.hb_timer, jiffies +
                  msecs_to_jiffies(ar->fw_recovery.hb_poll));
 }