Re: [PATCH v11 08/18] HID: asus: add support to force feedback

From: Sakari Ailus

Date: Mon Oct 26 2026 - 14:30:10 EST


Hi Ilpo,

On Mon, Oct 26, 2026 at 08:21:54PM +0200, Ilpo Järvinen wrote:
> > > + u8 *dmabuf __free(kfree) = kmemdup(buf, len, GFP_KERNEL);
> >
> > It's not very nice to assign variables and then check for errors. I'd thus
> > separate the declaration and the assignment.
>
> I actually thought the same thing first.
>
> But then stopped and realized, it's mid-function declaration of a cleanup
> variable exactly following the guidelines (the long comment in cleanup.h).
>
> So this function doesn't really have variable declaration block at all,
> making the mid-function variable declaration look like one. I understand
> it looks confusing when encountering this for the first time, it was for
> me as well.

Indeed. I missed __free() there -- one shouldn't review patches too early
in the morning!

--
Regards,

Sakari Ailus