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: Thu, 8 Feb 2024 23:57:04 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Ran Wang <ran.wang_1@....com>, Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Peter Chen <peter.chen@....com>, Frank Li <Frank.Li@....com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Fix an IS_ERR() vs NULL check in
 dwc3_power_off_all_roothub_ports()

On Wed, Jan 31, 2024, Dan Carpenter wrote:
> The ioremap() function doesn't return error pointers, it returns NULL on
> error.  Update the check.
> 
> Fixes: 2d2a3349521d ("usb: dwc3: Add workaround for host mode VBUS glitch when boot")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/usb/dwc3/host.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index ae189b7a4f8b..4e6239d3a0ac 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -35,7 +35,7 @@ static void dwc3_power_off_all_roothub_ports(struct dwc3 *dwc)
>  	/* xhci regs is not mapped yet, do it temperary here */
>  	if (dwc->xhci_resources[0].start) {
>  		xhci_regs = ioremap(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END);
> -		if (IS_ERR(xhci_regs)) {
> +		if (!xhci_regs) {
>  			dev_err(dwc->dev, "Failed to ioremap xhci_regs\n");
>  			return;
>  		}
> -- 
> 2.43.0
> 

Acked-by: Thinh Nguyen <Thinh.Nguyen@...opsys.com>

Thinh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ