ath10k: else is not generally useful after a break or return
authorKalle Valo <kvalo@qca.qualcomm.com>
Sun, 14 Sep 2014 09:50:33 +0000 (12:50 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 18 Sep 2014 07:46:25 +0000 (10:46 +0300)
Fixes checkpatch warnings:

WARNING: else is not generally useful after a break or return

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/pci.c

index 2bfd00b292044978b09ae6d521e365824c6a94d7..ff914b4ac0e6dc406795db3a45512f1122f60343 100644 (file)
@@ -1180,8 +1180,8 @@ int ath10k_debug_register(struct ath10k *ar)
        if (IS_ERR_OR_NULL(ar->debug.debugfs_phy)) {
                if (IS_ERR(ar->debug.debugfs_phy))
                        return PTR_ERR(ar->debug.debugfs_phy);
-               else
-                       return -ENOMEM;
+
+               return -ENOMEM;
        }
 
        INIT_DELAYED_WORK(&ar->debug.htt_stats_dwork,
index 26196ed947bc79dddd74e71761ca706784e34a52..18117b9a1e9a99d44b400a574b81e0215845678d 100644 (file)
@@ -450,11 +450,11 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt,
                if (last_msdu) {
                        msdu->next = NULL;
                        break;
-               } else {
-                       next = ath10k_htt_rx_netbuf_pop(htt);
-                       msdu->next = next;
-                       msdu = next;
                }
+
+               next = ath10k_htt_rx_netbuf_pop(htt);
+               msdu->next = next;
+               msdu = next;
        }
        *tail_msdu = msdu;
 
@@ -631,8 +631,8 @@ static struct ieee80211_hdr *ath10k_htt_rx_skb_get_hdr(struct sk_buff *skb)
 
        if (fmt == RX_MSDU_DECAP_RAW)
                return (void *)skb->data;
-       else
-               return (void *)skb->data - RX_HTT_HDR_STATUS_LEN;
+
+       return (void *)skb->data - RX_HTT_HDR_STATUS_LEN;
 }
 
 /* This function only applies for first msdu in an msdu chain */
index c1cf6ff319e82a71242f0cdd523411b86e8c71c6..28e6db1d38462a2b244293659776768ff8a9a132 100644 (file)
@@ -698,8 +698,8 @@ static int ath10k_monitor_recalc(struct ath10k *ar)
 
        if (should_start)
                return ath10k_monitor_start(ar);
-       else
-               return ath10k_monitor_stop(ar);
+
+       return ath10k_monitor_stop(ar);
 }
 
 static int ath10k_recalc_rtscts_prot(struct ath10k_vif *arvif)
@@ -4065,8 +4065,8 @@ ath10k_bitrate_mask_nss(const struct cfg80211_bitrate_mask *mask,
                        continue;
                else if (mask->control[band].ht_mcs[i] == 0x00)
                        break;
-               else
-                       return false;
+
+               return false;
        }
 
        ht_nss = i;
@@ -4077,8 +4077,8 @@ ath10k_bitrate_mask_nss(const struct cfg80211_bitrate_mask *mask,
                        continue;
                else if (mask->control[band].vht_mcs[i] == 0x0000)
                        break;
-               else
-                       return false;
+
+               return false;
        }
 
        vht_nss = i;
index 08e88a3758c168925cb3f361e6144d8563d40458..abd0a681d56c10396a96d361862f6e410ecf970e 100644 (file)
@@ -362,10 +362,11 @@ static inline const char *ath10k_pci_get_irq_method(struct ath10k *ar)
 
        if (ar_pci->num_msi_intrs > 1)
                return "msi-x";
-       else if (ar_pci->num_msi_intrs == 1)
+
+       if (ar_pci->num_msi_intrs == 1)
                return "msi";
-       else
-               return "legacy";
+
+       return "legacy";
 }
 
 static int __ath10k_pci_rx_post_buf(struct ath10k_pci_pipe *pipe)