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] [day] [month] [year] [list]
Date:   Tue, 27 Oct 2020 14:03:01 +0100
From:   Thierry Reding <thierry.reding@...il.com>
To:     Tang Bin <tangbin@...s.chinamobile.com>
Cc:     stern@...land.harvard.edu, gregkh@...uxfoundation.org,
        jonathanh@...dia.com, linux-usb@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: host: ehci-tegra: Fix error handling in
 tegra_ehci_probe()

On Mon, Oct 26, 2020 at 05:06:57PM +0800, Tang Bin wrote:
> If the function platform_get_irq() failed, the negative value
> returned will not be detected here. So fix error handling in
> tegra_ehci_probe().
> 
> Fixes: 79ad3b5add4a ("usb: host: Add EHCI driver for NVIDIA Tegra SoCs")
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> ---
>  drivers/usb/host/ehci-tegra.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
> index 75a075daf..7b0efaf15 100644
> --- a/drivers/usb/host/ehci-tegra.c
> +++ b/drivers/usb/host/ehci-tegra.c
> @@ -479,9 +479,9 @@ static int tegra_ehci_probe(struct platform_device *pdev)
>  	u_phy->otg->host = hcd_to_bus(hcd);
>  
>  	irq = platform_get_irq(pdev, 0);
> -	if (!irq) {
> -		err = -ENODEV;
> -		goto cleanup_phy;
> +	if (irq < 0) {
> +		err = irq;
> +		goto cleanup_phy;
>  	}
>  
>  	otg_set_host(u_phy->otg, &hcd->self);

Acked-by: Thierry Reding <treding@...dia.com>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ