Re: [PATCH v2] media: uvcvideo: Use scope-based cleanup helper
From: Markus Elfring
Date: Mon Jan 05 2026 - 04:51:56 EST
…
> Replace the manual kfree() with __free(kfree) annotation for data
> references. This aligns the code with the latest kernel style.
Align?
…
> ---
> drivers/media/usb/uvc/uvc_video.c | 23 ++++++++---------------
…
Some contributors would appreciate patch version descriptions.
https://lore.kernel.org/all/?q=%22This+looks+like+a+new+version+of+a+previously+submitted+patch%22
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc4#n310
…
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -291,7 +291,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
> struct uvc_streaming_control *ctrl, int probe, u8 query)
> {
> u16 size = uvc_video_ctrl_size(stream);
> - u8 *data;
> + u8 *data __free(kfree) = NULL;
> int ret;
…
How do you think about to reduce the scopes also for these local variables?
Regards,
Markus