lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <612c5209c635c3cb1fe3c6472fb2b0561d03c0fe.camel@gmail.com>
Date: Thu, 22 Aug 2024 12:03:59 +0100
From: Mark Einon <mark.einon@...il.com>
To: Yuesong Li <liyuesong@...o.com>, davem@...emloft.net,
 edumazet@...gle.com,  kuba@...nel.org, pabeni@...hat.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, 
	opensource.kernel@...o.com
Subject: Re: [PATCH v1] driver:net:et131x:Remove NULL check of list_entry()

On Thu, 2024-08-22 at 11:05 +0800, Yuesong Li wrote:
> list_entry() will never return a NULL pointer, thus remove the
> check.
> 
> Signed-off-by: Yuesong Li <liyuesong@...o.com>

Reviewed-by: Mark Einon <mark.einon@...il.com>

Thanks,

Mark

> ---
>  drivers/net/ethernet/agere/et131x.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/agere/et131x.c
> b/drivers/net/ethernet/agere/et131x.c
> index b325e0cef120..74fc55b9f0d9 100644
> --- a/drivers/net/ethernet/agere/et131x.c
> +++ b/drivers/net/ethernet/agere/et131x.c
> @@ -2244,11 +2244,6 @@ static struct rfd *nic_rx_pkts(struct
> et131x_adapter *adapter)
>  	element = rx_local->recv_list.next;
>  	rfd = list_entry(element, struct rfd, list_node);
>  
> -	if (!rfd) {
> -		spin_unlock_irqrestore(&adapter->rcv_lock, flags);
> -		return NULL;
> -	}
> -
>  	list_del(&rfd->list_node);
>  	rx_local->num_ready_recv--;
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ