Re: [PATCH] HID: u2fzero: free allocated URB on probe errors
From: Benjamin Tissoires
Date: Thu May 21 2026 - 11:30:38 EST
On Fri, 24 Apr 2026 22:21:31 +0900, Myeonghun Pak wrote:
> u2fzero_fill_in_urb() allocates dev->urb with usb_alloc_urb(), but
> u2fzero_probe() ignored its return value and only freed the URB from
> u2fzero_remove().
>
> If LED or hwrng registration fails after the URB allocation, probe returns
> an error and the driver core does not call .remove(), leaking the URB. A
> failed URB setup was also allowed to continue probing with an unusable
> device.
>
> [...]
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git (for-7.1/upstream-fixes), thanks!
[1/1] HID: u2fzero: free allocated URB on probe errors
https://git.kernel.org/hid/hid/c/2e78b21864dd
Cheers,
--
Benjamin Tissoires <bentiss@xxxxxxxxxx>