public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: Marc Ferland <ferlandm@amotus.ca>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] gnss: add USB support
Date: Mon, 20 Dec 2021 14:25:33 +0100	[thread overview]
Message-ID: <YcCETSO17GpP+3Hh@hovoldconsulting.com> (raw)
In-Reply-To: <091d25b4-cfa5-c702-144a-8cfdb70b7f42@suse.com>

On Mon, Dec 20, 2021 at 01:49:23PM +0100, Oliver Neukum wrote:
> 
> On 20.12.21 12:19, Johan Hovold wrote:
> > +static int gnss_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)

> > +	urb = usb_alloc_urb(0, GFP_KERNEL);
> > +	if (!urb)
> > +			goto err_put_gdev;
> 
> The value of 'ret' here is the result of
> usb_find_common_endpoints(), hence 0 due to the prior test.

> > +err_free_buf:
> > +	kfree(buf);
> > +err_free_urb:
> > +	usb_free_urb(urb);
> > +err_put_gdev:
> > +	gnss_put_device(gdev);
> > +err_free_gusb:
> > +	kfree(gusb);
> > +
> > +	return ret;
> Yet you return it in the error case and subsequent error cases..

Thanks for spotting that! I'll fix it up before applying.

Johan

  reply	other threads:[~2021-12-20 13:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20 11:18 [PATCH 0/2] gnss: add USB support Johan Hovold
2021-12-20 11:19 ` [PATCH 1/2] " Johan Hovold
2021-12-20 12:49   ` Oliver Neukum
2021-12-20 13:25     ` Johan Hovold [this message]
2021-12-20 11:19 ` [PATCH 2/2] gnss: usb: add support for Sierra Wireless XM1210 Johan Hovold
2021-12-20 19:04   ` Marc Ferland
2021-12-22 14:46     ` Johan Hovold
2021-12-20 12:15 ` [PATCH 0/2] gnss: add USB support Greg KH
2021-12-20 13:26   ` Johan Hovold

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=YcCETSO17GpP+3Hh@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=ferlandm@amotus.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.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