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]
Message-ID: 
 <PH0PR18MB4474AE468493AE97094D0002DE102@PH0PR18MB4474.namprd18.prod.outlook.com>
Date: Wed, 24 Apr 2024 05:06:19 +0000
From: Hariprasad Kelam <hkelam@...vell.com>
To: Ma Ke <make_ruc2021@....com>, "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org"
	<kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "jtornosm@...hat.com" <jtornosm@...hat.com>,
        "andrew@...n.ch"
	<andrew@...n.ch>,
        "horms@...nel.org" <horms@...nel.org>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>
CC: "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] net: usb: ax88179_178a: Add check for usbnet_get_endpoints()

See inline,

> To avoid the failure of usbnet_get_endpoints(), we should check the return
> value of the usbnet_get_endpoints().
> 
> Signed-off-by: Ma Ke <make_ruc2021@....com>
> ---
>  drivers/net/usb/ax88179_178a.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/ax88179_178a.c
> b/drivers/net/usb/ax88179_178a.c index 752f821a1990..cf8d19584725
> 100644
> --- a/drivers/net/usb/ax88179_178a.c
> +++ b/drivers/net/usb/ax88179_178a.c
> @@ -1288,7 +1288,9 @@ static int ax88179_bind(struct usbnet *dev, struct
> usb_interface *intf)  {
>  	struct ax88179_data *ax179_data;
> 
> -	usbnet_get_endpoints(dev, intf);
> +	ret = usbnet_get_endpoints(dev, intf);
> +	if (ret < 0)
> +		return ret;

Don't we need to declare "ret" variable. Did you compiled  this patch before submitting.
Thanks,
Hariprasad k
> 
>  	ax179_data = kzalloc(sizeof(*ax179_data), GFP_KERNEL);
>  	if (!ax179_data)
> --
> 2.37.2
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ