On Mon, Dec 20, 2021 at 01:49:23PM +0100, Oliver Neukum wrote:
On 20.12.21 12:19, Johan Hovold wrote:
quoted
+static int gnss_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
quoted
+ 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.
quoted
+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