Re: [PATCH RESEND 5/5] HID: multitouch: add device ID for Apple Touch Bar

From: Benjamin Tissoires
Date: Tue Mar 25 2025 - 13:29:57 EST


On Mar 25 2025, Aditya Garg wrote:
> Yes I can move hid_find_field to the original location as well. But, I would not want to devm_kzalloc as well unnecessarily if the touchbar is in the basic mode instead of drm mode which will cause this -ENODEV to be executed right?

It shouldn't matter. hid_core calls devres_open_group() before calling
.probe(), and calls devres_release_group() on failure. So yes, we'll
allocate a piece of memory and release it after, but it's not something
uncommon.

Cheers,
Benjamin