Re: [PATCH 1/2] gnss: add USB support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux