ath10k: remove an unnecessary NULL check
Subsystems (2)
PATCH 1/1 ath10k: remove an unnecessary NULL check
The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed.
--- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/wmi.c +1 -1
@@ -2578,7 +2578,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar, survey = &ar->survey[idx]; -if (!params->mac_clk_mhz || !survey) +if (!params->mac_clk_mhz)return ;memset (survey,0 ,sizeof (*survey));
Signature · 1 line
2.11.0
Quoted 13 lines · Dan Carpenter
The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed.
Signed-off-by Dan Carpenter <[email protected]>--- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath10k/wmi.c +0
-0
drivers/net/wireless/ath/ath10k/wmi.c static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar, · line 2582
Quoted 6 lines
drivers/net/wireless/ath/ath10k/wmi.c +1
-1@@ -2578,7 +2578,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar, survey = &ar->survey[idx]; -if (!params->mac_clk_mhz || !survey) +if (!params->mac_clk_mhz)return ;
Can you please CC linux-wireless so that patchwork sees this?
Signature · 1 line
Kalle Valo
Quoted 16 lines · Kalle Valo
Quoted 14 lines · Dan Carpenter
The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed.
Signed-off-by Dan Carpenter <[email protected]>--- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath10k/wmi.c +0
-0@@ -2578,7 +2578,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar,
Quoted 8 lines
drivers/net/wireless/ath/ath10k/wmi.c static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar, · line 2582
Quoted 5 lines
drivers/net/wireless/ath/ath10k/wmi.c +1
-1survey = &ar->survey[idx]; -if (!params->mac_clk_mhz || !survey) +if (!params->mac_clk_mhz)return ;Can you please CC linux-wireless so that patchwork sees this?
Sure. I can resend.
regards,
dan carpenter
PATCH 1/1 ath10k: remove an unnecessary NULL check
In reply to Dan CarpenterThe "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed.
---
Resending with linux-wireless Cc for patchwork.
drivers/net/wireless/ath/ath10k/wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath10k/wmi.c +1 -1
@@ -2578,7 +2578,7 @@ static void ath10k_wmi_event_chan_info_unpaired(struct ath10k *ar, survey = &ar->survey[idx]; -if (!params->mac_clk_mhz || !survey) +if (!params->mac_clk_mhz)return ;memset (survey,0 ,sizeof (*survey));
Signature · 1 line
2.11.0
Quoted 5 lines · Dan Carpenter
The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed.
Signed-off-by Dan Carpenter <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
27120f2ac995 ath10k: remove an unnecessary NULL check
Signature · 3 lines
https://patchwork.kernel.org/patch/10704625/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 5 lines · Dan Carpenter
The "survey" pointer is the address of an array element. We know that it can't be NULL so this check can be removed.
Signed-off-by Dan Carpenter <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
27120f2ac995 ath10k: remove an unnecessary NULL check
Signature · 9 lines
https://patchwork.kernel.org/patch/10704625/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k