linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv()
@ 2025-03-21 14:35 Dan Carpenter
  2025-03-21 15:52 ` Lorenzo Bianconi
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-03-21 14:35 UTC (permalink / raw)
  To: Shayne Chen
  Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Sean Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Peter Chiu, Bo Jiao,
	Howard Hsu, linux-wireless, linux-kernel, linux-arm-kernel,
	linux-mediatek, kernel-janitors

The "msta_link" pointer has two NULL checks.  Delete the second check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index ddd555942c73..03539e20f5c5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -2242,9 +2242,6 @@ mt7996_mcu_sta_mld_setup_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
 		if (!link)
 			continue;
 
-		if (!msta_link)
-			continue;
-
 		mld_setup_link->wcid = cpu_to_le16(msta_link->wcid.idx);
 		mld_setup_link->bss_idx = link->mt76.idx;
 		mld_setup_link++;
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv()
  2025-03-21 14:35 [PATCH] wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv() Dan Carpenter
@ 2025-03-21 15:52 ` Lorenzo Bianconi
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Bianconi @ 2025-03-21 15:52 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Shayne Chen, Felix Fietkau, Ryder Lee, Sean Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Peter Chiu, Bo Jiao,
	Howard Hsu, linux-wireless, linux-kernel, linux-arm-kernel,
	linux-mediatek, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]

> The "msta_link" pointer has two NULL checks.  Delete the second check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ---
>  1 file changed, 3 deletions(-)
> 

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> index ddd555942c73..03539e20f5c5 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
> @@ -2242,9 +2242,6 @@ mt7996_mcu_sta_mld_setup_tlv(struct mt7996_dev *dev, struct sk_buff *skb,
>  		if (!link)
>  			continue;
>  
> -		if (!msta_link)
> -			continue;
> -
>  		mld_setup_link->wcid = cpu_to_le16(msta_link->wcid.idx);
>  		mld_setup_link->bss_idx = link->mt76.idx;
>  		mld_setup_link++;
> -- 
> 2.47.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-21 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-21 14:35 [PATCH] wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv() Dan Carpenter
2025-03-21 15:52 ` Lorenzo Bianconi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).