]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: Introduce free_usb_request helper
authorKuen-Han Tsai <khtsai@google.com>
Tue, 16 Sep 2025 08:21:33 +0000 (16:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Sep 2025 10:44:53 +0000 (12:44 +0200)
commit201c53c687f2b55a7cc6d9f4000af4797860174b
treeb22ab3c8f1f90eba19a5c29576da3a7b84069573
parentbfb1d99d969fe3b892db30848aeebfa19d21f57f
usb: gadget: Introduce free_usb_request helper

Introduce the free_usb_request() function that frees both the request's
buffer and the request itself.

This function serves as the cleanup callback for DEFINE_FREE() to enable
automatic, scope-based cleanup for usb_request pointers.

Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Link: https://lore.kernel.org/r/20250916-ready-v1-2-4997bf277548@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250916-ready-v1-2-4997bf277548@google.com
include/linux/usb/gadget.h