summaryrefslogtreecommitdiff
path: root/rust/alloc/collections/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorKuen-Han Tsai <khtsai@google.com>2025-12-30 18:13:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-07 16:17:11 +0100
commit0c0981126b99288ed354d3d414c8a5fd42ac9e25 (patch)
tree6c25956138aee7a91036539412a5a31569ca7109 /rust/alloc/collections/git@git.tavy.me:linux.git
parente065c6a7e46c2ee9c677fdbf50035323d2de1215 (diff)
usb: gadget: u_ether: Add auto-cleanup helper for freeing net_device
The net_device in the u_ether framework currently requires explicit calls to unregister and free the device. Introduce gether_unregister_free_netdev() and the corresponding auto-cleanup macro. This ensures that if a net_device is registered, it is properly unregistered and the associated work queue is flushed before the memory is freed. This is a preparatory patch to simplify error handling paths in gadget drivers by removing the need for explicit goto labels for net_device cleanup. Signed-off-by: Kuen-Han Tsai <khtsai@google.com> Link: https://patch.msgid.link/20251230-ncm-refactor-v1-2-793e347bc7a7@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions