Linux-USB Archive mirror
 help / color / mirror / Atom feed
From: Hariprasad Kelam <hkelam@marvell.com>
To: Ma Ke <make_ruc2021@163.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"jtornosm@redhat.com" <jtornosm@redhat.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"horms@kernel.org" <horms@kernel.org>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] net: usb: ax88179_178a: Add check for usbnet_get_endpoints()
Date: Wed, 24 Apr 2024 05:06:19 +0000	[thread overview]
Message-ID: <PH0PR18MB4474AE468493AE97094D0002DE102@PH0PR18MB4474.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20240424011454.1554088-1-make_ruc2021@163.com>

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@163.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
> 


      reply	other threads:[~2024-04-24  5:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  1:14 [PATCH] net: usb: ax88179_178a: Add check for usbnet_get_endpoints() Ma Ke
2024-04-24  5:06 ` Hariprasad Kelam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR18MB4474AE468493AE97094D0002DE102@PH0PR18MB4474.namprd18.prod.outlook.com \
    --to=hkelam@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=jtornosm@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=make_ruc2021@163.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).