diff mbox series

[next] ath11k: remove redundant initialization of pointer info

Message ID 20200507164318.56570-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit 52b776fa592178c3dc341a93fec7bc760b38cc15
Delegated to: Kalle Valo
Headers show
Series [next] ath11k: remove redundant initialization of pointer info | expand

Commit Message

Colin King May 7, 2020, 4:43 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/net/wireless/ath/ath11k/mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo May 12, 2020, 7:34 a.m. UTC | #1
Colin King <colin.king@canonical.com> wrote:

> 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>

Patch applied to ath-next branch of ath.git, thanks.

52b776fa5921 ath11k: remove redundant initialization of pointer info
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index d9117ebf2809..1a7e5817e5c8 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -3692,7 +3692,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;