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]
Date:   Wed, 18 May 2022 10:17:45 -0400
From:   Alan Stern <stern@...land.harvard.edu>
To:     Li Zhengyu <lizhengyu3@...wei.com>
Cc:     dbaryshkov@...il.com, gregkh@...uxfoundation.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] usb: host: ohci-tmio: Remove redundant if statement

On Wed, May 18, 2022 at 10:43:47AM +0800, Li Zhengyu wrote:
> (ret == 0) is true when (ret) is false, so remove it.
> Also remove unreachable code.
> 
> Signed-off-by: Li Zhengyu <lizhengyu3@...wei.com>
> ---

Acked-by: Alan Stern <stern@...land.harvard.edu>

>  drivers/usb/host/ohci-tmio.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
> index 49539b9f0e94..6bcb0cb53f7c 100644
> --- a/drivers/usb/host/ohci-tmio.c
> +++ b/drivers/usb/host/ohci-tmio.c
> @@ -243,12 +243,8 @@ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
>  	ret = usb_add_hcd(hcd, irq, 0);
>  	if (ret)
>  		goto err_add_hcd;
> -
>  	device_wakeup_enable(hcd->self.controller);
> -	if (ret == 0)
> -		return ret;
> -
> -	usb_remove_hcd(hcd);
> +	return ret;
>  
>  err_add_hcd:
>  	tmio_stop_hc(dev);
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ