{
        struct ath10k *ar = arvif->ar;
        int ret;
+       unsigned long time_left;
 
        lockdep_assert_held(&ar->conf_mutex);
 
        if (ret)
                return ret;
 
-       ret = wait_for_completion_timeout(&ar->install_key_done, 3*HZ);
-       if (ret == 0)
+       time_left = wait_for_completion_timeout(&ar->install_key_done, 3 * HZ);
+       if (time_left == 0)
                return -ETIMEDOUT;
 
        return 0;
 
 static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
 {
-       int ret;
+       unsigned long time_left;
 
        lockdep_assert_held(&ar->conf_mutex);
 
        if (test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags))
                return -ESHUTDOWN;
 
-       ret = wait_for_completion_timeout(&ar->vdev_setup_done,
-                                         ATH10K_VDEV_SETUP_TIMEOUT_HZ);
-       if (ret == 0)
+       time_left = wait_for_completion_timeout(&ar->vdev_setup_done,
+                                               ATH10K_VDEV_SETUP_TIMEOUT_HZ);
+       if (time_left == 0)
                return -ETIMEDOUT;
 
        return 0;
        const u8 *peer_addr;
        int vdev_id;
        int ret;
+       unsigned long time_left;
 
        /* FW requirement: We must create a peer before FW will send out
         * an offchannel frame. Otherwise the frame will be stuck and
 
                ath10k_mac_tx(ar, skb);
 
-               ret = wait_for_completion_timeout(&ar->offchan_tx_completed,
-                                                 3 * HZ);
-               if (ret == 0)
+               time_left =
+               wait_for_completion_timeout(&ar->offchan_tx_completed, 3 * HZ);
+               if (time_left == 0)
                        ath10k_warn(ar, "timed out waiting for offchannel skb %p\n",
                                    skb);