Subject: Re: [PATCH net-next] net: libwx: Fix dead code for duplicate check

From: Leon Romanovsky <[email-masked]>
Date: Thu, 17 Nov 2022 11:33:31 +0200

On Wed, Nov 16, 2022 at 09:58:35AM +0800, Jiawen Wu wrote:
> Fix duplicate check on polling timeout.
> 
> Fixes: 1efa9bfe58c5 ("net: libwx: Implement interaction with firmware")
> Signed-off-by: Jiawen Wu <[email-masked]>
> ---
>  drivers/net/ethernet/wangxun/libwx/wx_hw.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> index 1eb7388f1dd5..c57dc3238b3f 100644
> --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> @@ -203,8 +203,6 @@ int wx_host_interface_command(struct wx_hw *wxhw, u32 *buffer,
>  
>  	status = read_poll_timeout(rd32, hicr, hicr & WX_MNG_MBOX_CTL_FWRDY, 1000,
>  				   timeout * 1000, false, wxhw, WX_MNG_MBOX_CTL);
> -	if (status)
> -		goto rel_out;

BTW, this driver should use readx_poll_timeout() instead of read_poll_timeout(...).

Thanks,
Reviewed-by: Leon Romanovsky <[email-masked]>