ath11k: remove redundant initialization of pointer info
authorColin Ian King <colin.king@canonical.com>
Thu, 7 May 2020 16:43:18 +0000 (17:43 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 12 May 2020 07:34:04 +0000 (10:34 +0300)
Pointer info is being assigned twice, once at the start of the function
and secondly when it is just about to be accessed. Remove the redundant
initialization and keep the original assignment to info that is close
to the memcpy that uses it.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200507164318.56570-1-colin.king@canonical.com
drivers/net/wireless/ath/ath11k/mac.c

index 5ffe558..4e1185a 100644 (file)
@@ -3693,7 +3693,7 @@ static int __ath11k_set_antenna(struct ath11k *ar, u32 tx_ant, u32 rx_ant)
 int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx)
 {
        struct sk_buff *msdu = skb;
-       struct ieee80211_tx_info *info = IEEE80211_SKB_CB(msdu);
+       struct ieee80211_tx_info *info;
        struct ath11k *ar = ctx;
        struct ath11k_base *ab = ar->ab;