[lvc-project] [PATCH] wifi: ath11k: drop NULL pointer check in ath11k_dp_rx_mon_dest_process()

Jeff Johnson quic_jjohnson at quicinc.com
Thu Sep 7 17:52:25 MSK 2023


On 9/7/2023 1:38 AM, Dmitry Antipov wrote:
> Since 'srng_list' is a fixed-size array of 'struct hal_srng'
> in 'struct ath11_hal', any of its member can't be NULL and
> so relevant check may be dropped.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>

Acked-by: Jeff Johnson <quic_jjohnson at quicinc.com>

> ---
>   drivers/net/wireless/ath/ath11k/dp_rx.c | 7 -------
>   1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
> index 146201d8dba2..4463e308968c 100644
> --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
> @@ -5094,13 +5094,6 @@ static void ath11k_dp_rx_mon_dest_process(struct ath11k *ar, int mac_id,
>   
>   	mon_dst_srng = &ar->ab->hal.srng_list[ring_id];
>   
> -	if (!mon_dst_srng) {
> -		ath11k_warn(ar->ab,
> -			    "HAL Monitor Destination Ring Init Failed -- %p",
> -			    mon_dst_srng);
> -		return;
> -	}
> -
>   	spin_lock_bh(&pmon->mon_lock);
>   
>   	ath11k_hal_srng_access_begin(ar->ab, mon_dst_srng);




More information about the lvc-project mailing list