Re: [PATCH] HID: sensor: custom: Fix the sensor state allocation
From: Jiri Kosina
Date: Fri Nov 20 2026 - 09:08:34 EST
On Fri, 20 Nov 2026, Sasha Levin wrote:
> Commit d8dcea5754a2 ("HID: sensor: custom: Fix state lifetime during
> removal") was applied with kzalloc(&pdev->dev, sizeof(*sensor_inst),
> GFP_KERNEL), which does not build:
>
> drivers/hid/hid-sensor-custom.c:1023:46: error: macro 'kzalloc' passed 3 arguments, but takes just 2
>
> The posted patch has kzalloc_obj(*sensor_inst). Use that.
>
> Fixes: d8dcea5754a2 ("HID: sensor: custom: Fix state lifetime during removal")
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
Thanks Sasha, I've just fixed this a couple minutes ago in hid.git
already, so the compile failure should be gone.
This was me fat-fingering merge.
--
Jiri Kosina
SUSE Labs