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: <YoZpcqDCwoXIvI5q@kroah.com>
Date:   Thu, 19 May 2022 17:59:46 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Kushagra Verma <kushagra765@...look.com>
Cc:     balbi@...nel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB / dwc3: remove the use of -ENOSYS from core.c

On Tue, May 17, 2022 at 08:22:00PM +0530, Kushagra Verma wrote:
> This patch removes the use of -ENOSYS as it is used when users try to call a
> syscall that doesn't exist. So, we don't need to check if 'ret == -ENOSYS'.

ENOSYS is also used internally in the kernel for other things.

> 
> Signed-off-by: Kushagra Verma <kushagra765@...look.com>
> ---
>  drivers/usb/dwc3/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index c78205c5e19f..3c1a877d5183 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1283,7 +1283,7 @@ static int dwc3_core_get_phy(struct dwc3 *dwc)
>  	dwc->usb2_generic_phy = devm_phy_get(dev, "usb2-phy");
>  	if (IS_ERR(dwc->usb2_generic_phy)) {
>  		ret = PTR_ERR(dwc->usb2_generic_phy);
> -		if (ret == -ENOSYS || ret == -ENODEV)
> +		if (ret == -ENODEV)

Did you validate that no callers can ever set this to ENOSYS?

Why was this added in the first place?  What commit added it?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ