Re: [PATCH] HID: logitech-hidpp: Fix FF device cleanup on init failure

Jiri Kosina <[email protected]> Mon, 3 Aug 2026 19:26:45 +0200 (CEST)
Newsgroups org.kernel.vger.linux-input,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 23 Jun 2026, Haoxiang Li wrote:

> hidpp_ff_init() creates the input force-feedback device with
> input_ff_create(), then allocates the HID++ FF private data,
> effect ID array, and workqueue.
> 
> If any of those allocations fail after input_ff_create() succeeds,
> the function returns an error without destroying the FF device.
> Add an unwind path that frees the private allocations made by
> hidpp_ff_init() and calls input_ff_destroy() for failures after
> input_ff_create() succeeds.
> 
> Fixes: ff21a635dd1a ("HID: logitech-hidpp: Force feedback support for the Logitech G920")
> Signed-off-by: Haoxiang Li <[email protected]>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs